Re: Linux-2.5.16

Linus Torvalds (torvalds@transmeta.com)
Tue, 21 May 2002 09:01:05 -0700 (PDT)


On Mon, 20 May 2002, David S. Miller wrote:
>
> It still needs to handle the "unmapping entire address space"
> vs. "unmapping munmap-like operation". Currently we'll flush
> excessively when doing exit_mmap().

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/