From 292ae1292c4f1f7c46a5dd0e67ef9741855d716b Mon Sep 17 00:00:00 2001 From: Nathan Lynch Date: Sun, 22 Aug 2004 22:33:51 -0700 Subject: [PATCH] [PATCH] ppc64: tweak schedule_timeout in __cpu_die The current code does schedule_timeout(HZ) when waiting for a cpu to die, which is a bit coarse and tends to limit the "throughput" of my stress tests :) Change the HZ timeout to HZ/5, increase the number of tries to 25 so the overall wait time is similar. In practice, I've never seen the loop need more than two iterations. Signed-off-by: Nathan Lynch Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/ppc64/kernel/smp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c index 828cdf36aeec4..b72e964c3a122 100644 --- a/arch/ppc64/kernel/smp.c +++ b/arch/ppc64/kernel/smp.c @@ -271,13 +271,13 @@ void __cpu_die(unsigned int cpu) int cpu_status; unsigned int pcpu = get_hard_smp_processor_id(cpu); - for (tries = 0; tries < 5; tries++) { + for (tries = 0; tries < 25; tries++) { cpu_status = query_cpu_stopped(pcpu); if (cpu_status == 0) break; set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ); + schedule_timeout(HZ/5); } if (cpu_status != 0) { printk("Querying DEAD? cpu %i (%i) shows %i\n", -- 2.53.0