Re: [PATCH] powerpc/qspinlock: Fix deadlock in MCS queue

2024-08-27 Thread Nysal Jan K.A.
On Wed, Aug 28, 2024 at 01:52:33PM GMT, Michael Ellerman wrote: > "Nysal Jan K.A." writes: > > If an interrupt occurs in queued_spin_lock_slowpath() after we increment > > qnodesp->count and before node->lock is initialized, another CPU might > > see stale lock values in get_tail_qnode(). If the s

Re: [PATCH] powerpc/qspinlock: Fix deadlock in MCS queue

2024-08-27 Thread Nysal Jan K.A.
On Wed, Aug 28, 2024 at 01:19:46PM GMT, Nicholas Piggin wrote: > What probably makes it really difficult to hit is that I think both > locks A and B need contention from other sources to push them into > queueing slow path. I guess that's omitted for brevity in the flow > above, which is fine. >

Re: [PATCH] powerpc/qspinlock: Fix deadlock in MCS queue

2024-08-27 Thread Michael Ellerman
"Nysal Jan K.A." writes: > If an interrupt occurs in queued_spin_lock_slowpath() after we increment > qnodesp->count and before node->lock is initialized, another CPU might > see stale lock values in get_tail_qnode(). If the stale lock value happens > to match the lock on that CPU, then we write t

Re: [PATCH] powerpc/qspinlock: Fix deadlock in MCS queue

2024-08-27 Thread Nicholas Piggin
Hey Nysal, This is really good debugging, and a nice write up. On Mon Aug 26, 2024 at 6:12 PM AEST, Nysal Jan K.A. wrote: > If an interrupt occurs in queued_spin_lock_slowpath() after we increment > qnodesp->count and before node->lock is initialized, another CPU might > see stale lock values in