From: Nick Piggin <npiggin@suse.de>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Linux-Arch <linux-arch@vger.kernel.org>,
Linux Memory Management <linux-mm@kvack.org>,
Hugh Dickins <hugh@tiscali.co.uk>,
linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org
Subject: Re: [RFC/PATCH] mm: Pass virtual address to [__]p{te, ud, md}_free_tlb()
Date: Tue, 21 Jul 2009 09:05:58 +0200 [thread overview]
Message-ID: <20090721070558.GA7816@wotan.suse.de> (raw)
In-Reply-To: <1248134546.30899.27.camel@pasglop>
On Tue, Jul 21, 2009 at 10:02:26AM +1000, Benjamin Herrenschmidt wrote:
> On Mon, 2009-07-20 at 12:38 +0200, Nick Piggin wrote:
> > On Mon, Jul 20, 2009 at 08:00:41PM +1000, Benjamin Herrenschmidt wrote:
> > > On Mon, 2009-07-20 at 10:10 +0200, Nick Piggin wrote:
> > > >
> > > > Maybe I don't understand your description correctly. The TLB contains
> > > > PMDs, but you say the HW still logically performs another translation
> > > > step using entries in the PMD pages? If I understand that correctly,
> > > > then generic mm does not actually care and would logically fit better
> > > > if those entries were "linux ptes".
> > >
> > > They are :-)
> > >
> > > > The pte invalidation routines
> > > > give the virtual address, which you could use to invalidate the TLB.
> > >
> > > For PTEs, yes, but not for those PMD entries. IE. I need the virtual
> > > address when destroying PMDs so that I can invalidate those "indirect"
> > > pages. PTEs are already taken care of by existing mechanisms.
> >
> > Hmm, so even after having invalidated all the pte translations
> > then you still need to invalidate the empty indirect page? (or
> > maybe you don't even invalidate the ptes if they're not cached
> > in a TLB).
>
> The PTEs are cached in the TLB (ie, they turn into normal TLB entries).
>
> We need to invalidate the indirect entries when the PMD value change
> (ie, when the PTE page is freed) or the TLB would potentially continue
> loading PTEs from a stale PTE page :-)
>
> Hence my patch adding the virtual address to pte_free_tlb() which is the
> freeing of a PTE page. I'm adding it to the pmd/pud variants too for
> consistency and because I believe there's no cost.
Yes I think we're on the same page now. So as I said, the
patch is quite OK with me.
next prev parent reply other threads:[~2009-07-21 7:06 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-15 7:49 [RFC/PATCH] mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() Benjamin Herrenschmidt
2009-07-15 13:56 ` [RFC/PATCH] mm: Pass virtual address to [__]p{te, ud, md}_free_tlb() Nick Piggin
2009-07-16 1:54 ` [RFC/PATCH] mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() Benjamin Herrenschmidt
2009-07-20 8:10 ` [RFC/PATCH] mm: Pass virtual address to [__]p{te, ud, md}_free_tlb() Nick Piggin
2009-07-20 10:00 ` [RFC/PATCH] mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() Benjamin Herrenschmidt
2009-07-20 10:38 ` [RFC/PATCH] mm: Pass virtual address to [__]p{te, ud, md}_free_tlb() Nick Piggin
2009-07-21 0:02 ` [RFC/PATCH] mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() Benjamin Herrenschmidt
2009-07-21 7:05 ` Nick Piggin [this message]
2009-07-20 7:11 ` Benjamin Herrenschmidt
2009-07-20 7:48 ` Martin Schwidefsky
2009-07-20 8:05 ` [RFC/PATCH] mm: Pass virtual address to [__]p{te, ud, md}_free_tlb() Nick Piggin
2009-07-20 9:59 ` [RFC/PATCH] mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() Benjamin Herrenschmidt
2009-07-20 10:39 ` [RFC/PATCH] mm: Pass virtual address to [__]p{te, ud, md}_free_tlb() Nick Piggin
2009-07-22 16:31 ` [RFC/PATCH] mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() Linus Torvalds
2009-07-23 0:53 ` Benjamin Herrenschmidt
2009-07-23 0:59 ` [RFC/PATCH] mm: Pass virtual address to [__]p{te, ud, md}_free_tlb() Kumar Gala
2009-07-27 19:11 ` [RFC/PATCH] mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() Linus Torvalds
2009-07-27 21:35 ` Benjamin Herrenschmidt
2009-07-28 0:17 ` Benjamin Herrenschmidt
2009-07-28 0:25 ` [RFC/PATCH] mm: Pass virtual address to [__]p{te, ud, md}_free_tlb() Paul Mundt
2009-07-28 0:41 ` [RFC/PATCH] mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() Linus Torvalds
2009-07-16 1:36 ` Michael Ellerman
2009-07-16 1:56 ` Benjamin Herrenschmidt
2009-07-20 12:46 ` [RFC/PATCH] mm: Pass virtual address to [__]p{te, ud, md}_free_tlb() David Howells
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=20090721070558.GA7816@wotan.suse.de \
--to=npiggin@suse.de \
--cc=benh@kernel.crashing.org \
--cc=hugh@tiscali.co.uk \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).