On Thu, Apr 24, 2014 at 7:41 PM, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> wrote: > On Fri, 2014-04-25 at 11:37 +1000, Benjamin Herrenschmidt wrote: >> >> The flip side is that we do a lot more IPIs for large invalidates, >> since we drop the PTL on every page table page. > > Oh I missed that your patch was smart enough to only do that in the > presence of non-anonymous dirty pages. That should take care of the > common case of short lived programs, those should still fit in a > single big batch. Right. It only causes extra TLB shootdowns for dirty shared mappings. Which, let's face it, don't actually ever happen. Using mmap to write to files is actually very rare, because it really sucks in just about all possible ways. There are almost no loads where it's not better to just use a "write()" system call instead. So the dirty shared mapping case _exists_, but it's pretty darn unusual. The case where you have lots of mmap/munmap activity is even less unusual. I suspect the most common case is for stress-testing the VM, because nobody sane does it for an actual real load. Linus -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>