From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: linux-mm@kvack.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Hugh Dickins <hugh@veritas.com>, Nick Piggin <npiggin@suse.de>
Subject: tlb_gather_mmu() and semantics of "fullmm"
Date: Thu, 26 Mar 2009 16:01:14 +1100 [thread overview]
Message-ID: <1238043674.25062.823.camel@pasglop> (raw)
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>
next reply other threads:[~2009-03-26 4:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-26 5:01 Benjamin Herrenschmidt [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1238043674.25062.823.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=akpm@linux-foundation.org \
--cc=hugh@veritas.com \
--cc=linux-mm@kvack.org \
--cc=npiggin@suse.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox