I'm considering just re-doing exit_mmap() entirely, so that it shares no
real code.
> I'll go and hack this into your new stuff.
Don't hack it into the existing stuff, the exit_mmap() really is
very different.
For example, in the exit_mmap() case, we should tear down the page tables
in top-to-bottom order, and that makes all the "tlb->pages[]" stuff
entirely unnecessary: we can just remove the _top_ pgd, and once that is
done (and the TLB invalidated), we can remove the pmd's and the pte's at
our leisure without any fear of races.
None of the complicated TLB flushing needed or wanted.
Also, exit_mmap() has no races with other threads etc, nor does it have
any reason to worry about the RSS of the process any more.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/