diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-04-16 23:20:00 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-13 13:20:14 -0700 |
commit | f40bf5f2fcef9e3123faf09cb33a5b0066e55b2d (patch) | |
tree | f822dd809cf81a4d5787e7e74907adbd97bca766 /arch/ia64/hp/common/sba_iommu.c | |
parent | 19eb722b762e235458d912fa6621590fa9bd49ed (diff) |
mutex: Don't spin when the owner CPU is offline or other weird cases
commit 4b402210486c6414fe5fbfd85934a0a22da56b04 upstream.
Due to recent load-balancer changes that delay the task migration to
the next wakeup, the adaptive mutex spinning ends up in a live lock
when the owner's CPU gets offlined because the cpu_online() check
lives before the owner running check.
This patch changes mutex_spin_on_owner() to return 0 (don't spin) in
any case where we aren't sure about the owner struct validity or CPU
number, and if the said CPU is offline. There is no point going back &
re-evaluate spinning in corner cases like that, let's just go to
sleep.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1271212509.13059.135.camel@pasglop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/ia64/hp/common/sba_iommu.c')
0 files changed, 0 insertions, 0 deletions