Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check

2016-07-15 Thread Pan Xinhui
Hi, Baibir sorry for late responce, I missed reading your mail. 在 16/7/6 18:54, Balbir Singh 写道: On Tue, 2016-06-28 at 10:43 -0400, Pan Xinhui wrote: This is to fix some lock holder preemption issues. Some other locks implementation do a spin loop before acquiring the lock itself.

Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check

2016-07-15 Thread Pan Xinhui
Hi, Baibir sorry for late responce, I missed reading your mail. 在 16/7/6 18:54, Balbir Singh 写道: On Tue, 2016-06-28 at 10:43 -0400, Pan Xinhui wrote: This is to fix some lock holder preemption issues. Some other locks implementation do a spin loop before acquiring the lock itself.

Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check

2016-07-06 Thread Balbir Singh
On Tue, 2016-06-28 at 10:43 -0400, Pan Xinhui wrote: > This is to fix some lock holder preemption issues. Some other locks > implementation do a spin loop before acquiring the lock itself. Currently > kernel has an interface of bool vcpu_is_preempted(int cpu). It take the cpu

Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check

2016-07-06 Thread Balbir Singh
On Tue, 2016-06-28 at 10:43 -0400, Pan Xinhui wrote: > This is to fix some lock holder preemption issues. Some other locks > implementation do a spin loop before acquiring the lock itself. Currently > kernel has an interface of bool vcpu_is_preempted(int cpu). It take the cpu

Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check

2016-07-06 Thread xinhui
On 2016年07月06日 16:32, Wanpeng Li wrote: 2016-07-06 15:58 GMT+08:00 Peter Zijlstra : On Wed, Jul 06, 2016 at 02:46:34PM +0800, Wanpeng Li wrote: SO it's easy for ppc to implement such interface. Note that yield_count is set by powerVM/KVM. and only pSeries can run a guest

Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check

2016-07-06 Thread xinhui
On 2016年07月06日 16:32, Wanpeng Li wrote: 2016-07-06 15:58 GMT+08:00 Peter Zijlstra : On Wed, Jul 06, 2016 at 02:46:34PM +0800, Wanpeng Li wrote: SO it's easy for ppc to implement such interface. Note that yield_count is set by powerVM/KVM. and only pSeries can run a guest for now. :) I also

Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check

2016-07-06 Thread Wanpeng Li
2016-07-06 15:58 GMT+08:00 Peter Zijlstra : > On Wed, Jul 06, 2016 at 02:46:34PM +0800, Wanpeng Li wrote: >> > SO it's easy for ppc to implement such interface. Note that yield_count is >> > set by powerVM/KVM. >> > and only pSeries can run a guest for now. :) >> > >> > I

Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check

2016-07-06 Thread Wanpeng Li
2016-07-06 15:58 GMT+08:00 Peter Zijlstra : > On Wed, Jul 06, 2016 at 02:46:34PM +0800, Wanpeng Li wrote: >> > SO it's easy for ppc to implement such interface. Note that yield_count is >> > set by powerVM/KVM. >> > and only pSeries can run a guest for now. :) >> > >> > I also review x86 related

Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check

2016-07-06 Thread Peter Zijlstra
On Wed, Jul 06, 2016 at 02:46:34PM +0800, Wanpeng Li wrote: > > SO it's easy for ppc to implement such interface. Note that yield_count is > > set by powerVM/KVM. > > and only pSeries can run a guest for now. :) > > > > I also review x86 related code, looks like we need add one hyer-call to get >

Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check

2016-07-06 Thread Peter Zijlstra
On Wed, Jul 06, 2016 at 02:46:34PM +0800, Wanpeng Li wrote: > > SO it's easy for ppc to implement such interface. Note that yield_count is > > set by powerVM/KVM. > > and only pSeries can run a guest for now. :) > > > > I also review x86 related code, looks like we need add one hyer-call to get >

Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check

2016-07-06 Thread Wanpeng Li
Cc Paolo, kvm ml 2016-07-06 12:58 GMT+08:00 xinhui : > Hi, wanpeng > > On 2016年07月05日 17:57, Wanpeng Li wrote: >> >> Hi Xinhui, >> 2016-06-28 22:43 GMT+08:00 Pan Xinhui : >>> >>> This is to fix some lock holder preemption issues. Some

Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check

2016-07-06 Thread Wanpeng Li
Cc Paolo, kvm ml 2016-07-06 12:58 GMT+08:00 xinhui : > Hi, wanpeng > > On 2016年07月05日 17:57, Wanpeng Li wrote: >> >> Hi Xinhui, >> 2016-06-28 22:43 GMT+08:00 Pan Xinhui : >>> >>> This is to fix some lock holder preemption issues. Some other locks >>> implementation do a spin loop before acquiring

Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check

2016-07-05 Thread xinhui
Hi, wanpeng On 2016年07月05日 17:57, Wanpeng Li wrote: Hi Xinhui, 2016-06-28 22:43 GMT+08:00 Pan Xinhui : This is to fix some lock holder preemption issues. Some other locks implementation do a spin loop before acquiring the lock itself. Currently kernel has an

Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check

2016-07-05 Thread xinhui
Hi, wanpeng On 2016年07月05日 17:57, Wanpeng Li wrote: Hi Xinhui, 2016-06-28 22:43 GMT+08:00 Pan Xinhui : This is to fix some lock holder preemption issues. Some other locks implementation do a spin loop before acquiring the lock itself. Currently kernel has an interface of bool

Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check

2016-07-05 Thread Wanpeng Li
Hi Xinhui, 2016-06-28 22:43 GMT+08:00 Pan Xinhui : > This is to fix some lock holder preemption issues. Some other locks > implementation do a spin loop before acquiring the lock itself. Currently > kernel has an interface of bool vcpu_is_preempted(int cpu). It take

Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check

2016-07-05 Thread Wanpeng Li
Hi Xinhui, 2016-06-28 22:43 GMT+08:00 Pan Xinhui : > This is to fix some lock holder preemption issues. Some other locks > implementation do a spin loop before acquiring the lock itself. Currently > kernel has an interface of bool vcpu_is_preempted(int cpu). It take the cpu > as parameter and

[PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check

2016-06-28 Thread Pan Xinhui
This is to fix some lock holder preemption issues. Some other locks implementation do a spin loop before acquiring the lock itself. Currently kernel has an interface of bool vcpu_is_preempted(int cpu). It take the cpu as parameter and return true if the cpu is preempted. Then kernel can break the

[PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check

2016-06-28 Thread Pan Xinhui
This is to fix some lock holder preemption issues. Some other locks implementation do a spin loop before acquiring the lock itself. Currently kernel has an interface of bool vcpu_is_preempted(int cpu). It take the cpu as parameter and return true if the cpu is preempted. Then kernel can break the