Re: [PATCH 1/2] locking/pvqspinlock: Fix missed PV wakeup problem

2016-05-27 Thread Waiman Long
On 05/27/2016 03:43 AM, Boqun Feng wrote: Hi Waiman, On Thu, May 26, 2016 at 02:21:57PM -0400, Waiman Long wrote: Currently, calling pv_hash() and setting _Q_SLOW_VAL is only done once for any pv_node. It is either in pv_kick_node() or in pv_wait_head_or_lock(). Because of lock stealing, a

Re: [PATCH 1/2] locking/pvqspinlock: Fix missed PV wakeup problem

2016-05-27 Thread Waiman Long
On 05/27/2016 03:43 AM, Boqun Feng wrote: Hi Waiman, On Thu, May 26, 2016 at 02:21:57PM -0400, Waiman Long wrote: Currently, calling pv_hash() and setting _Q_SLOW_VAL is only done once for any pv_node. It is either in pv_kick_node() or in pv_wait_head_or_lock(). Because of lock stealing, a

Re: [PATCH 1/2] locking/pvqspinlock: Fix missed PV wakeup problem

2016-05-27 Thread Boqun Feng
Hi Waiman, On Thu, May 26, 2016 at 02:21:57PM -0400, Waiman Long wrote: > Currently, calling pv_hash() and setting _Q_SLOW_VAL is only > done once for any pv_node. It is either in pv_kick_node() or in > pv_wait_head_or_lock(). Because of lock stealing, a pv_kick'ed node is > not guaranteed to get

Re: [PATCH 1/2] locking/pvqspinlock: Fix missed PV wakeup problem

2016-05-27 Thread Boqun Feng
Hi Waiman, On Thu, May 26, 2016 at 02:21:57PM -0400, Waiman Long wrote: > Currently, calling pv_hash() and setting _Q_SLOW_VAL is only > done once for any pv_node. It is either in pv_kick_node() or in > pv_wait_head_or_lock(). Because of lock stealing, a pv_kick'ed node is > not guaranteed to get

[PATCH 1/2] locking/pvqspinlock: Fix missed PV wakeup problem

2016-05-26 Thread Waiman Long
Currently, calling pv_hash() and setting _Q_SLOW_VAL is only done once for any pv_node. It is either in pv_kick_node() or in pv_wait_head_or_lock(). Because of lock stealing, a pv_kick'ed node is not guaranteed to get the lock before the spinning threshold expires and has to call pv_wait() again.

[PATCH 1/2] locking/pvqspinlock: Fix missed PV wakeup problem

2016-05-26 Thread Waiman Long
Currently, calling pv_hash() and setting _Q_SLOW_VAL is only done once for any pv_node. It is either in pv_kick_node() or in pv_wait_head_or_lock(). Because of lock stealing, a pv_kick'ed node is not guaranteed to get the lock before the spinning threshold expires and has to call pv_wait() again.