[PATCH v6 02/11] locking/osq: Drop the overload of osq_lock()

2016-10-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. Kernel has an interface bool vcpu_is_preempted(int cpu

Re: [PATCH v6 02/11] locking/osq: Drop the overload of osq_lock()

2016-10-29 Thread Davidlohr Bueso
On Fri, 28 Oct 2016, Pan Xinhui wrote: /* * If we need to reschedule bail... so we can block. +* Use vcpu_is_preempted to detech lock holder preemption issue ^^ detect + * and break. Could you please

Re: [PATCH v6 02/11] locking/osq: Drop the overload of osq_lock()

2016-10-30 Thread Pan Xinhui
在 2016/10/30 00:52, Davidlohr Bueso 写道: On Fri, 28 Oct 2016, Pan Xinhui wrote: /* * If we need to reschedule bail... so we can block. + * Use vcpu_is_preempted to detech lock holder preemption issue ^^ detect ok. thanks for