* [patch] ppc32: set smp_tb_synchronized on UP with SMP kernel
@ 2005-12-10 23:11 Johannes Berg
2005-12-10 23:47 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2005-12-10 23:11 UTC (permalink / raw)
To: linuxppc-dev; +Cc: akpm, paulus
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);
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [patch] ppc32: set smp_tb_synchronized on UP with SMP kernel
2005-12-10 23:11 [patch] ppc32: set smp_tb_synchronized on UP with SMP kernel Johannes Berg
@ 2005-12-10 23:47 ` Benjamin Herrenschmidt
2005-12-11 0:00 ` Johannes Berg
0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2005-12-10 23:47 UTC (permalink / raw)
To: Johannes Berg; +Cc: akpm, linuxppc-dev, paulus
On Sun, 2005-12-11 at 00:11 +0100, Johannes Berg wrote:
> 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>
Please, remove the useless { }
Ben.
> ---
>
> 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);
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [patch] ppc32: set smp_tb_synchronized on UP with SMP kernel
2005-12-10 23:47 ` Benjamin Herrenschmidt
@ 2005-12-11 0:00 ` Johannes Berg
2005-12-11 0:25 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2005-12-11 0:00 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: akpm, linuxppc-dev
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:56:53.756328000 +0100
@@ -301,6 +301,10 @@
/* 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);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] ppc32: set smp_tb_synchronized on UP with SMP kernel
2005-12-11 0:00 ` Johannes Berg
@ 2005-12-11 0:25 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2005-12-11 0:25 UTC (permalink / raw)
To: Johannes Berg; +Cc: akpm, linuxppc-dev
On Sun, 2005-12-11 at 01:00 +0100, Johannes Berg wrote:
> 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>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> 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:56:53.756328000 +0100
> @@ -301,6 +301,10 @@
>
> /* 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);
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-12-11 0:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-10 23:11 [patch] ppc32: set smp_tb_synchronized on UP with SMP kernel Johannes Berg
2005-12-10 23:47 ` Benjamin Herrenschmidt
2005-12-11 0:00 ` Johannes Berg
2005-12-11 0:25 ` Benjamin Herrenschmidt
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).