]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries: Fix cpu hotplug
authorSebastien Dugue <sebastien.dugue@bull.net>
Thu, 27 Nov 2008 00:59:52 +0000 (00:59 +0000)
committerPaul Mackerras <paulus@samba.org>
Tue, 23 Dec 2008 04:13:27 +0000 (15:13 +1100)
commit4106348eac5639105ad0b03ed51b1a4f29595be2
tree1a3fa1f47f82476c8945661ea01e7be8ffb88713
parent52a22390dc444537a8a9e85a60fb53d198909f7f
powerpc/pseries: Fix cpu hotplug

Currently, pseries_cpu_die() calls msleep() while polling RTAS for
the status of the dying cpu.

However, if the cpu that is going down also happens to be the one
doing the tick then we're hosed as the tick_do_timer_cpu 'baton' is
only passed later on in tick_shutdown() when _cpu_down() does the
CPU_DEAD notification.  Therefore jiffies won't be updated anymore.

This replaces that msleep() with a cpu_relax() to make sure we're not
going to schedule at that point.

With this patch my test box survives a 100k iterations hotplug stress
test on _all_ cpus, whereas without it, it quickly dies after ~50
iterations.

Signed-off-by: Sebastien Dugue <sebastien.dugue@bull.net>
Cc: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/pseries/hotplug-cpu.c