Commit 292ae129 authored by Nathan Lynch's avatar Nathan Lynch Committed by Linus Torvalds

[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: default avatarNathan Lynch <nathanl@austin.ibm.com>
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 37cfbd31
...@@ -271,13 +271,13 @@ void __cpu_die(unsigned int cpu) ...@@ -271,13 +271,13 @@ void __cpu_die(unsigned int cpu)
int cpu_status; int cpu_status;
unsigned int pcpu = get_hard_smp_processor_id(cpu); 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); cpu_status = query_cpu_stopped(pcpu);
if (cpu_status == 0) if (cpu_status == 0)
break; break;
set_current_state(TASK_UNINTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ); schedule_timeout(HZ/5);
} }
if (cpu_status != 0) { if (cpu_status != 0) {
printk("Querying DEAD? cpu %i (%i) shows %i\n", printk("Querying DEAD? cpu %i (%i) shows %i\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment