On Wed, Jun 27, 2012 at 2:15 PM, Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> wrote: > This originated from s390 which does something similar and would allow > s390 to use the generic TLB flushing code. > > The idea is to flush the mm wide cache and tlb a priory and not bother > with multiple flushes if the batching isn't large enough. > > This can be safely done since there cannot be any concurrency on this > mm, its either after the process died (exit) or in the middle of > execve where the thread switched to the new mm. I think we actually *used* to do the final TLB flush from within the context of the process that died. That doesn't seem to ever be the case any more, but it does worry me a bit. Maybe a VM_BUG_ON(current->active_mm == mm); or something for the fullmm case? 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>