linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* tlb_gather_mmu() and semantics of "fullmm"
@ 2009-03-26  5:01 Benjamin Herrenschmidt
  2009-03-26 14:08 ` Hugh Dickins
  0 siblings, 1 reply; 14+ messages in thread
From: Benjamin Herrenschmidt @ 2009-03-26  5:01 UTC (permalink / raw)
  To: linux-mm; +Cc: Linus Torvalds, Andrew Morton, Hugh Dickins, Nick Piggin

Hi !

I'd like to clarify something about the semantics of the "full_mm_flush"
argument of tlb_gather_mmu().

The reason is that it can either mean:

 - All the mappings for that mm are being flushed

or

 - The above +plus+ the mm is dead and has no remaining user. IE, we
can relax some of the rules because we know the mappings cannot be
accessed concurrently, and thus the PTEs cannot be reloaded into the
TLB.

If it means the later (which it does in practice today, since we only
call it from exit_mmap(), unless I missed an important detail), then I
could implement some optimisations in my own arch code, but more
importantly, I believe we might also be able to optimize the generic
(and x86) code to avoid flushing the TLB when the batch of pages fills
up, before freeing the pages.

That would have the side effect of speeding up exit of large processes
by limiting the number of tlb flushes they do. Since the TLB would need
to be flushed only once at the end for archs that may carry more than
one context in their TLB, and possibly not at all on x86 since it
doesn't and the context isn't active any more.

Or am I missing something ?

Cheers,
Ben.



--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2009-03-27  7:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-26  5:01 tlb_gather_mmu() and semantics of "fullmm" Benjamin Herrenschmidt
2009-03-26 14:08 ` Hugh Dickins
2009-03-26 16:38   ` Linus Torvalds
2009-03-26 23:13     ` Benjamin Herrenschmidt
2009-03-26 17:21   ` Jeremy Fitzhardinge
2009-03-26 20:39   ` David Miller
2009-03-26 22:33   ` Benjamin Herrenschmidt
2009-03-27  5:04     ` David Miller
2009-03-27  5:38       ` Benjamin Herrenschmidt
2009-03-27  5:44         ` David Miller
2009-03-27  5:54           ` Benjamin Herrenschmidt
2009-03-27  5:57             ` David Miller
2009-03-27  6:10               ` Benjamin Herrenschmidt
2009-03-27  8:05                 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox