Hmm.. We could simplify it even further by moving the exit_mmap() from
mmput() into mmdrop(), at which point we know that we exit the mm only
after nobody is using the thing any more at all, and it has been flushed
from the TLB's.
The only downside of that is that we currently do the mmdrop in the middle
of the context switch, and we'd have to move it to _after_ the context
switch. Which is slightly complicated. The other problem is that with lazy
TLB's, we might delay actually freeing the pages for a longish time
especially on big SMP machines (if the MM ends up being lazy on an idle
CPU for long)..
So while this approach would be absolutely wonderful from a TLB behaviour
approach, it might not be the best approach in some other ways. Ideas?
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/