Re: [PATCH 1/2] locking/qspinlock: Store lock holder cpu in lock if feasible

2020-07-12 Thread Peter Zijlstra
On Sat, Jul 11, 2020 at 02:21:27PM -0400, Waiman Long wrote: > +static DEFINE_PER_CPU_READ_MOSTLY(u8, pcpu_lockval) = _Q_LOCKED_VAL; > > /* > * We must be able to distinguish between no-tail and the tail at 0:0, > @@ -138,6 +139,19 @@ struct mcs_spinlock *grab_mcs_node(struct mcs_spinlock >

[PATCH 1/2] locking/qspinlock: Store lock holder cpu in lock if feasible

2020-07-11 Thread Waiman Long
When doing crash dump analysis with lock, it is cumbersome to find out who the lock holder is. One have to look at the call traces of all the cpus to figure that out. It will be helpful if the lock itself can provide some clue about the lock holder cpu. The locking state is determined by whether t