diff options
author | Peter Zijlstra <[email protected]> | 2018-02-06 17:52:13 +0100 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2018-02-13 11:44:41 +0100 |
commit | 269d599271fa604f09d5cb0093c5dd5d59964dd5 (patch) | |
tree | e6cb32acb59211a8842d78f3590ba54165ae8491 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | a7711602c7b79950ea437178f601b52ab08ef659 (diff) |
sched/core: Fix DEBUG_SPINLOCK annotation for rq->lock
Mark noticed that he had sporadic "spinlock recursion" warnings from
the DEBUG_SPINLOCK code. Now rq->lock is special in that the owner
changes in the middle of a context switch.
It so happens that we fix up the lock.owner too late, @prev can run
(remotely) the moment prev->on_cpu is cleared, this then allows @prev
to again try and acquire this rq->lock and trigger this warning.
So we have to switch lock.owner before clearing prev->on_cpu.
Do this by moving the DEBUG_SPINLOCK annotation from after switch_to()
to before switch_to() and collect all lockdep annotations there into
prepare_lock_switch() to mirror the existing finish_lock_switch().
Debugged-by: Mark Rutland <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Acked-by: Mark Rutland <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions