From: Johannes Berg <johannes@sipsolutions.net>
To: linuxppc-dev@ozlabs.org
Cc: akpm@osdl.org, paulus@cs.anu.edu.au
Subject: [patch] ppc32: set smp_tb_synchronized on UP with SMP kernel
Date: Sun, 11 Dec 2005 00:11:19 +0100 [thread overview]
Message-ID: <1134256279.3810.8.camel@localhost> (raw)
ppc32 kernel, when built with CONFIG_SMP and booted on a single CPU
machine, will not properly set smp_tb_synchronized, thus causing
gettimeofday() to not use the HW timebase and to be limited to jiffy
resolution. This, among others, causes unacceptable pauses when
launching X.org.
Signed-Off-By: Johannes Berg <johannes@sipsolutions.net>
---
With this patch, X.org startup time goes down from ~30 seconds to normal
(just a second or so). The know-how really comes from BenH who I
discussed with on IRC.
--- linux-2.6.15-rc5.orig/arch/ppc/kernel/smp.c 2005-12-10 23:56:23.026328000 +0100
+++ linux-2.6.15-rc5/arch/ppc/kernel/smp.c 2005-12-11 00:03:40.556328000 +0100
@@ -301,6 +301,11 @@
/* Probe platform for CPUs: always linear. */
num_cpus = smp_ops->probe();
+
+ if (num_cpus < 2) {
+ smp_tb_synchronized = 1;
+ }
+
for (i = 0; i < num_cpus; ++i)
cpu_set(i, cpu_possible_map);
next reply other threads:[~2005-12-10 23:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-10 23:11 Johannes Berg [this message]
2005-12-10 23:47 ` [patch] ppc32: set smp_tb_synchronized on UP with SMP kernel Benjamin Herrenschmidt
2005-12-11 0:00 ` Johannes Berg
2005-12-11 0:25 ` Benjamin Herrenschmidt
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=1134256279.3810.8.camel@localhost \
--to=johannes@sipsolutions.net \
--cc=akpm@osdl.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@cs.anu.edu.au \
/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).