From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: linux-mm@kvack.org, Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [RFC/PATCH] Use mmu_gather for fork() instead of flush_tlb_mm()
Date: Mon, 09 Jul 2007 19:12:29 +1000 [thread overview]
Message-ID: <1183972349.5961.25.camel@localhost.localdomain> (raw)
In-Reply-To: <4691E64F.5070506@yahoo.com.au>
On Mon, 2007-07-09 at 17:39 +1000, Nick Piggin wrote:
> Would it be better off to start off with a new API for this? The
> mmu gather I think is traditionally entirely for dealing with
> page removal...
It would be weird because the new API would mostly duplicate this one,
and we would end up with duplicated hooks..
I think it's fine to have one mmu_gather construct to gather changes to
PTEs, it doesn't have to contain freed pages, though it can. Appart from
that simple nr test, it's entirely the same code and the existing
implementation for all archs should just work (well, should, I haven't
actually looked in details yet :-)
Maybe we can use a separate call than tlb_remove_tlb_entry() tho,
something like tlb_invalidate_entry(), which by default would do the
same but that archs can override if they want to distinguish page
freeing and simple invalidations at that level.
That means adding a suitable default __tlb_invalidate_entry() to all
archs but that shouldn't be too hard with a bit of help from the various
maintainers.
But I think the rest of the mmu_gather interface should stay the same.
I would like to add a few more things to it next, mostly:
- tlb_gather_lockdrop() (or find a better name) called just before we
drop the page table / PTE lock. That would allow me to bring back ppc64
to use the normal mmu_gather API instead of hijacking the lazy mmu stuff
as it's doing now by flushing my batches before the lock is dropped.
- start moving over pretty much everything that walks page tables to it
So that in the end, we basically go down to:
- flush_tlb_page() for single page invalidates (protection faults for
example)
- mmu_gather batches for everything else userland
- possibly stick to something else for kernel mappings, to be
discussed. I'm find with doing batches there too :-)
The current situation is just too messy imho, and generalizing batches
will be useful to platforms like hash table ppc's or funky TLBs.
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 prev parent reply other threads:[~2007-07-09 9:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-09 3:47 removing flush_tlb_mm as a generic hook ? Benjamin Herrenschmidt
2007-07-09 6:36 ` Benjamin Herrenschmidt
2007-07-09 6:45 ` [RFC/PATCH] Use mmu_gather for fork() instead of flush_tlb_mm() Benjamin Herrenschmidt
2007-07-09 7:39 ` Nick Piggin
2007-07-09 9:12 ` Benjamin Herrenschmidt [this message]
2007-07-09 9:29 ` Nick Piggin
2007-07-09 9:47 ` Benjamin Herrenschmidt
2007-07-09 10:12 ` Nick Piggin
2007-07-09 10:18 ` Nick Piggin
2007-07-09 12:37 ` Benjamin Herrenschmidt
2007-07-09 12:32 ` Benjamin Herrenschmidt
2007-07-09 6:46 ` [RFC/PATCH] Use mmu_gather for /proc stuff " Benjamin Herrenschmidt
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=1183972349.5961.25.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nickpiggin@yahoo.com.au \
/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