From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: linux-mm@kvack.org
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>,
Linux Arch list <linux-arch@vger.kernel.org>,
Linus Torvalds <torvalds@osdl.org>
Subject: Re: What archs need flush_tlb_page() in handle_pte_fault() ?
Date: Mon, 06 Aug 2007 16:37:42 +1000 [thread overview]
Message-ID: <1186382262.938.35.camel@localhost.localdomain> (raw)
In-Reply-To: <1186018621.5495.558.camel@localhost.localdomain>
On Thu, 2007-08-02 at 11:37 +1000, Benjamin Herrenschmidt wrote:
> Heya !
>
> In my page table accessor spring cleaning, one of my targets is
> flush_tlb_page(). At this stage, it's only called by generic code in one
> place (in addition to the asm-generic bits that use it to implement
> missing accessors, but I'm taking care of those spearately) :
.../...
No reply, so I suppose I can rip it out ? :-)
Thus any reason why that patch wouln't fly ? (not for 2.6.23 of course)
This removes the last occurence of flush_tlb_page() from generic code,
thus making this hook now optional for architectures that don't use
the helpers in asm-generic/pgtable.h
I couldn't find a case where this is actually needed, but I may well
have missed something. If I did though, please tell me what. If an
architecture need that call for obscure reason, it could be simply
folded in that architecture's implementation ptep_set_access_flags().
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
Index: linux-work/mm/memory.c
===================================================================
--- linux-work.orig/mm/memory.c 2007-08-06 16:32:12.000000000 +1000
+++ linux-work/mm/memory.c 2007-08-06 16:34:07.000000000 +1000
@@ -2609,15 +2609,6 @@ static inline int handle_pte_fault(struc
if (ptep_set_access_flags(vma, address, pte, entry, write_access)) {
update_mmu_cache(vma, address, entry);
lazy_mmu_prot_update(entry);
- } else {
- /*
- * This is needed only for protection faults but the arch code
- * is not yet telling us if this is a protection fault or not.
- * This still avoids useless tlb flushes for .text page faults
- * with threads.
- */
- if (write_access)
- flush_tlb_page(vma, address);
}
unlock:
pte_unmap_unlock(pte, ptl);
prev parent reply other threads:[~2007-08-06 6:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-02 1:37 What archs need flush_tlb_page() in handle_pte_fault() ? Benjamin Herrenschmidt
2007-08-06 6:37 ` Benjamin Herrenschmidt [this message]
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=1186382262.938.35.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=torvalds@osdl.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).