Skip to content

x86, ticketlock: spin_unlock_wait() can livelock

Oleg Nesterov lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1x86, ticketlock: spin_unlock_wait() can livelockarch/x86/include/asm/spinlock.h+13 -13 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1] x86, ticketlock: spin_unlock_wait() can livelock

Please review, I'm afraid I could miss something.

OTOH, this almost looks like a bug to me. And in fact I have a bug report which looks as if spin_unlock_wait() actually spins "forever" until the system panics, although most probably the are other problems in kernel/sched which lead to rq->lock contention.

Do we need a barrier() in arch_spin_unlock_wait() ? I guess no, and the current code doesn't have it.

Perhaps it should use __ticket_lock_spinning() like arch_spin_lock() ?

And probably we should add the lockdep annotations.

Oleg.