From: venkatesh.pallipadi@intel.com
To: mingo@elte.hu, tglx@linutronix.de, hpa@zytor.com
Cc: linux-kernel@vger.kernel.org, suresh.b.siddha@intel.com,
shaohua.li@intel.com,
Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Subject: [patch 2/2] x86: cpa_flush_array wbinvd should be done on all CPUs
Date: Fri, 22 May 2009 13:23:38 -0700 [thread overview]
Message-ID: <20090522202505.440854000@intel.com> (raw)
In-Reply-To: 20090522202336.942728000@intel.com
[-- Attachment #1: 0002--cpa_flush_array-wbinvd-should-be-done-on-all-CPUs.patch --]
[-- Type: text/plain, Size: 1111 bytes --]
cpa_flush_array seems to prefer wbinvd() over clflush at 4M threshold.
clflush needs to be done on only one CPU as per instruction definition.
wbinvd() however, should be done on all CPUs.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
---
arch/x86/mm/pageattr.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 2cc019a..0f9052b 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -204,6 +204,11 @@ static void cpa_flush_range(unsigned long start, int numpages, int cache)
}
}
+static void wbinvd_local(void *unused)
+{
+ wbinvd();
+}
+
static void cpa_flush_array(unsigned long *start, int numpages, int cache,
int in_flags, struct page **pages)
{
@@ -219,7 +224,8 @@ static void cpa_flush_array(unsigned long *start, int numpages, int cache,
/* 4M threshold */
if (numpages >= 1024) {
if (boot_cpu_data.x86 >= 4)
- wbinvd();
+ on_each_cpu(wbinvd_local, NULL, 1);
+
return;
}
/*
--
1.6.0.6
--
next prev parent reply other threads:[~2009-05-22 20:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-22 20:23 [patch 0/2] x86: Misc bug fixes in pageattr.c venkatesh.pallipadi
2009-05-22 20:23 ` [patch 1/2] x86: bugfix wbinvd() model check instead of family check venkatesh.pallipadi
2009-05-22 20:23 ` venkatesh.pallipadi [this message]
2009-05-22 20:34 ` [patch 0/2] x86: Misc bug fixes in pageattr.c H. Peter Anvin
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=20090522202505.440854000@intel.com \
--to=venkatesh.pallipadi@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=shaohua.li@intel.com \
--cc=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
/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