Re: [PATCH 3/3] locking/osq: Drop the overload of osq_lock()

2016-06-27 Thread Peter Zijlstra
On Mon, Jun 27, 2016 at 01:41:30PM -0400, Pan Xinhui wrote: > @@ -118,8 +123,17 @@ bool osq_lock(struct optimistic_spin_queue *lock) > while (!READ_ONCE(node->locked)) { > /* >* If we need to reschedule bail... so we can block. > + * An

[PATCH 3/3] locking/osq: Drop the overload of osq_lock()

2016-06-27 Thread Pan Xinhui
An over-committed guest with more vCPUs than pCPUs has a heavy overload in osq_lock(). This is because vCPU A hold the osq lock and yield out, vCPU B wait per_cpu node->locked to be set. IOW, vCPU B wait vCPU A to run and unlock the osq lock. Such spinning is meaningless. So lets use