Messages in this thread | | | Date | Tue, 21 May 2002 09:45:35 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: Linux-2.5.16 |
| |
On Tue, 21 May 2002, Linus Torvalds wrote: > > 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.
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?
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/
| |