Re: [PATCH v2 0/6] KVM: arm64: VCPU preempted check support

2020-12-29 Thread yezengruan
On 2020/1/15 22:14, Marc Zyngier wrote: > On 2020-01-13 12:12, Will Deacon wrote: >> [+PeterZ] >> >> On Thu, Dec 26, 2019 at 09:58:27PM +0800, Zengruan Ye wrote: >>> This patch set aims to support the vcpu_is_preempted() functionality >>> under KVM/arm64, which allowing the guest to obtain the VCPU

Re: [PATCH v2 0/6] KVM: arm64: VCPU preempted check support

2020-12-16 Thread yezengruan
On 2020/1/15 22:14, Marc Zyngier wrote: > On 2020-01-13 12:12, Will Deacon wrote: >> [+PeterZ] >> >> On Thu, Dec 26, 2019 at 09:58:27PM +0800, Zengruan Ye wrote: >>> This patch set aims to support the vcpu_is_preempted() functionality >>> under KVM/arm64, which allowing the guest to obtain the VCPU

Re: [PATCH v2 6/6] KVM: arm64: Support the VCPU preemption check

2020-01-10 Thread yezengruan
Hi Steve, On 2020/1/9 23:09, Steven Price wrote: > On 26/12/2019 13:58, Zengruan Ye wrote: >> Support the vcpu_is_preempted() functionality under KVM/arm64. This will >> enhance lock performance on overcommitted hosts (more runnable VCPUs >> than physical CPUs in the system) as doing busy waits fo

Re: [PATCH v2 3/6] KVM: arm64: Support pvlock preempted via shared structure

2020-01-10 Thread yezengruan
Hi Steve, On 2020/1/9 23:02, Steven Price wrote: > On 26/12/2019 13:58, Zengruan Ye wrote: >> Implement the service call for configuring a shared structure between a >> VCPU and the hypervisor in which the hypervisor can tell the VCPU is >> running or not. >> >> The preempted field is zero if 1) s

Re: [PATCH v2 1/6] KVM: arm64: Document PV-lock interface

2020-01-10 Thread yezengruan
Hi Steve, On 2020/1/9 22:53, Steven Price wrote: > On 26/12/2019 13:58, Zengruan Ye wrote: >> Introduce a paravirtualization interface for KVM/arm64 to obtain the VCPU >> is currently running or not. >> >> The PV lock structure of the guest is allocated by user space. >> >> A hypercall interface i

Re: [PATCH v2 5/6] KVM: arm64: Add interface to support VCPU preempted check

2019-12-26 Thread yezengruan
Hi, On 2019/12/27 2:51, kbuild test robot wrote: > Hi Zengruan, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on kvmarm/next] > [also build test ERROR on kvm/linux-next linus/master v5.5-rc3 next-20191220] > [cannot apply to arm64/for-next/core] > [if your pat

Re: [PATCH 5/5] KVM: arm64: Support the vcpu preemption check

2019-12-26 Thread yezengruan
Hi Steve, On 2019/12/17 22:40, Steven Price wrote: > On Tue, Dec 17, 2019 at 01:55:49PM +, yezengr...@huawei.com wrote: >> From: Zengruan Ye >> >> Support the vcpu_is_preempted() functionality under KVM/arm64. This will >> enhance lock performance on overcommitted hosts (more runnable vcpus >

Re: [PATCH 3/5] KVM: arm64: Support pvlock preempted via shared structure

2019-12-26 Thread yezengruan
Hi Steve, On 2019/12/17 22:33, Steven Price wrote: > On Tue, Dec 17, 2019 at 01:55:47PM +, yezengr...@huawei.com wrote: >> From: Zengruan Ye >> >> Implement the service call for configuring a shared structure between a >> vcpu and the hypervisor in which the hypervisor can tell the vcpu is >>

Re: [PATCH 1/5] KVM: arm64: Document PV-lock interface

2019-12-22 Thread yezengruan
Hi Markus, On 2019/12/20 22:32, Markus Elfring wrote: > … >> +++ b/Documentation/virt/kvm/arm/pvlock.rst > … >> +Paravirtualized lock support for arm64 >> +== >> + >> +KVM/arm64 provids some … > … > > I suggest to avoid a typo here. Thanks for posting this. >

Re: [PATCH 2/5] KVM: arm64: Implement PV_LOCK_FEATURES call

2019-12-19 Thread yezengruan
Hi Steve, On 2019/12/17 22:28, Steven Price wrote: > On Tue, Dec 17, 2019 at 01:55:46PM +, yezengr...@huawei.com wrote: >> From: Zengruan Ye >> >> This provides a mechanism for querying which paravirtualized lock >> features are available in this hypervisor. >> >> Also add the header file whi

Re: [PATCH 1/5] KVM: arm64: Document PV-lock interface

2019-12-19 Thread yezengruan
Hi Steve, On 2019/12/17 22:21, Steven Price wrote: > On Tue, Dec 17, 2019 at 01:55:45PM +, yezengr...@huawei.com wrote: >> From: Zengruan Ye >> >> Introduce a paravirtualization interface for KVM/arm64 to obtain the vcpu >> is currently running or not. >> >> A hypercall interface is provided

[PATCH 1/5] KVM: arm64: Document PV-lock interface

2019-12-17 Thread yezengruan
From: Zengruan Ye Introduce a paravirtualization interface for KVM/arm64 to obtain the vcpu is currently running or not. A hypercall interface is provided for the guest to interrogate the hypervisor's support for this interface and the location of the shared memory structures. Signed-off-by: Ze

[PATCH 5/5] KVM: arm64: Support the vcpu preemption check

2019-12-17 Thread yezengruan
From: Zengruan Ye Support the vcpu_is_preempted() functionality under KVM/arm64. This will enhance lock performance on overcommitted hosts (more runnable vcpus than physical cpus in the system) as doing busy waits for preempted vcpus will hurt system performance far worse than early yielding. un

[PATCH 2/5] KVM: arm64: Implement PV_LOCK_FEATURES call

2019-12-17 Thread yezengruan
From: Zengruan Ye This provides a mechanism for querying which paravirtualized lock features are available in this hypervisor. Also add the header file which defines the ABI for the paravirtualized lock features we're about to add. Signed-off-by: Zengruan Ye --- arch/arm64/include/asm/pvlock-

[PATCH 0/5] KVM: arm64: vcpu preempted check support

2019-12-17 Thread yezengruan
From: Zengruan Ye This patch set aims to support the vcpu_is_preempted() functionality under KVM/arm64, which allowing the guest to obtain the vcpu is currently running or not. This will enhance lock performance on overcommitted hosts (more runnable vcpus than physical cpus in the system) as doin

[PATCH 3/5] KVM: arm64: Support pvlock preempted via shared structure

2019-12-17 Thread yezengruan
From: Zengruan Ye Implement the service call for configuring a shared structure between a vcpu and the hypervisor in which the hypervisor can tell the vcpu is running or not. The preempted field is zero if 1) some old KVM deos not support this filed. 2) the vcpu is not preempted. Other values me

[PATCH 4/5] KVM: arm64: Add interface to support vcpu preempted check

2019-12-17 Thread yezengruan
From: Zengruan Ye 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 takes the cpu as parameter and return true if the cpu is preempted. Then k