lkml.org 
[lkml]   [2016]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3] locking/pvqspinlock: restore/set vcpu_hashed state after failing adaptive locking spinning
2016-07-14 22:52 GMT+08:00 Waiman Long <waiman.long@hpe.com>:
[...]
> As pv_kick_node() is called immediately after designating the next node as
> the queue head, the chance of this racing is possible, but is not likely
> unless the lock holder vCPU gets preempted for a long time at that right
> moment. This change does not do any harm though, so I am OK with that.
> However, I do want you to add a comment about the possible race in the code
> as it isn't that obvious or likely.

How about something like:

/*
* If the lock holder vCPU gets preempted for a long time, pv_kick_node will
* advance its state and hash the lock, restore/set the vcpu_hashed state to
* avoid the race.
*/

Btw, do you think patch title should be improved, what do you like?

Regards,
Wanpeng Li

\
 
 \ /
  Last update: 2016-07-15 00:21    [W:0.042 / U:3.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site