diff options
| author | Benjamin Herrenschmidt <[email protected]> | 2010-04-16 21:20:00 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2010-04-23 09:00:28 +0000 |
| commit | 4b402210486c6414fe5fbfd85934a0a22da56b04 (patch) | |
| tree | 23e7052c710e0443ccd895a1000b2bdd7723ab51 /drivers/mtd/lpddr/lpddr_cmds.c | |
| parent | Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
| download | kernel-4b402210486c6414fe5fbfd85934a0a22da56b04.tar.gz kernel-4b402210486c6414fe5fbfd85934a0a22da56b04.zip | |
mutex: Don't spin when the owner CPU is offline or other weird cases
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 <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
LKML-Reference: <1271212509.13059.135.camel@pasglop>
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'drivers/mtd/lpddr/lpddr_cmds.c')
0 files changed, 0 insertions, 0 deletions
