From: john stultz <johnstul@us.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
"Martin J. Bligh" <mbligh@google.com>,
apw@uk.ibm.com
Subject: [PATCH -mm] i386: Don't disable the TSC on single node NUMAQs
Date: Tue, 07 Feb 2006 14:33:27 -0800 [thread overview]
Message-ID: <1139351607.10057.223.camel@cog.beaverton.ibm.com> (raw)
Currently on NUMAQ hardware we set tsc_disable=1 because on multi-node
NUMAQ hardware the TSC is not synced. However, it is safe to use the TSC
on single node NUMAQs. Thus this patch only disables the TSC if
num_online_nodes() > 1.
This should fix performance issues seen w/ -mm by mbligh on elm3b132
(which is a single node NUMAQ). These performance issues originated
because with mainline code, the function that disables the TSC runs
after time_init, thus the TSC is used regardless, allowing for possible
timekeeping errors on multi-node systems.
With my new timekeeping work (in 2.6.16-rc1-mm1,mm2 and mm5), we do not
select the TSC until later, so we see the TSC has been disabled and use
the slower PIT instead as the original code intends. This caused the
performance regression.
While this patch allows the TSC to be used safely only on single node
NUMAQs, multi-node NUMAQs may still see a performance drop from using
the PIT, but this is necessary as using unsynched TSCs will result in
incorrect timekeeping.
For test results, please see the graph:
http://test.kernel.org/perf/kernbench.elm3b132.png
2.6.16-rc1-mm5: without this patch
2.6.16-rc1-mm5+p22126: with this patch
This patch also fixes the typo'ed function name.
thanks
-john
Signed-off-by: John Stultz <johnstul@us.ibm.com>
diff --git a/arch/i386/kernel/numaq.c b/arch/i386/kernel/numaq.c
index 5f5b075..0caf146 100644
--- a/arch/i386/kernel/numaq.c
+++ b/arch/i386/kernel/numaq.c
@@ -79,10 +79,12 @@ int __init get_memcfg_numaq(void)
return 1;
}
-static int __init numaq_dsc_disable(void)
+static int __init numaq_tsc_disable(void)
{
- printk(KERN_DEBUG "NUMAQ: disabling TSC\n");
- tsc_disable = 1;
+ if (num_online_nodes() > 1) {
+ printk(KERN_DEBUG "NUMAQ: disabling TSC\n");
+ tsc_disable = 1;
+ }
return 0;
}
-core_initcall(numaq_dsc_disable);
+arch_initcall(numaq_tsc_disable);
next reply other threads:[~2006-02-07 22:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-07 22:33 john stultz [this message]
2006-02-07 23:38 ` Martin Bligh
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=1139351607.10057.223.camel@cog.beaverton.ibm.com \
--to=johnstul@us.ibm.com \
--cc=akpm@osdl.org \
--cc=apw@uk.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@google.com \
/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
all inboxes | Powered by JetHome®