Commit 0dceeaf5 authored by Pan Xinhui's avatar Pan Xinhui Committed by Ingo Molnar
Browse files

locking/qspinlock: Use __this_cpu_dec() instead of full-blown this_cpu_dec()

queued_spin_lock_slowpath() should not worry about another
queued_spin_lock_slowpath() running in interrupt context and
changing node->count by accident, because node->count keeps
the same value every time we enter/leave queued_spin_lock_slowpath().

On some architectures this_cpu_dec() will save/restore irq flags,
which has high overhead. Use the much cheaper __this_cpu_dec() instead.
Signed-off-by: default avatarPan Xinhui <>
Signed-off-by: default avatarPeter Zijlstra (Intel) <>
Cc: Linus Torvalds <>
Cc: Mike Galbraith <>
Cc: Peter Zijlstra <>
Cc: Thomas Gleixner <>

[ Rewrote changelog. ]
Signed-off-by: default avatarIngo Molnar <>
parent ebff09a6
......@@ -619,7 +619,7 @@ void queued_spin_lock_slowpath(struct qspinlock *lock, u32 val)
* release the node
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