From: tip-bot for Rik van Riel <riel@redhat.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
torvalds@linux-foundation.org, a.p.zijlstra@chello.nl,
riel@redhat.com, akpm@linux-foundation.org, tglx@linutronix.de
Subject: [tip:sched/numa] mm: Only flush the TLB when clearing an accessible pte
Date: Fri, 12 Oct 2012 04:24:52 -0700 [thread overview]
Message-ID: <tip-vm3rkzevahelwhejx5uwm8ex@git.kernel.org> (raw)
Commit-ID: 154e911b453560aa1e6e11d47e5f95289817b932
Gitweb: http://git.kernel.org/tip/154e911b453560aa1e6e11d47e5f95289817b932
Author: Rik van Riel <riel@redhat.com>
AuthorDate: Tue, 9 Oct 2012 15:31:59 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 12 Oct 2012 12:07:16 +0200
mm: Only flush the TLB when clearing an accessible pte
If ptep_clear_flush() is called to clear a page table entry that is
accessible anyway by the CPU, eg. a _PAGE_PROTNONE page table entry,
there is no need to flush the TLB on remote CPUs.
Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/n/tip-vm3rkzevahelwhejx5uwm8ex@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
mm/pgtable-generic.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/mm/pgtable-generic.c b/mm/pgtable-generic.c
index 74c0dda..0996d34 100644
--- a/mm/pgtable-generic.c
+++ b/mm/pgtable-generic.c
@@ -88,7 +88,8 @@ pte_t ptep_clear_flush(struct vm_area_struct *vma, unsigned long address,
{
pte_t pte;
pte = ptep_get_and_clear((vma)->vm_mm, address, ptep);
- flush_tlb_page(vma, address);
+ if (pte_accessible(pte))
+ flush_tlb_page(vma, address);
return pte;
}
#endif
reply other threads:[~2012-10-12 11:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=tip-vm3rkzevahelwhejx5uwm8ex@git.kernel.org \
--to=riel@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.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