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 v2 5/6] KVM: arm64: Add interface to support VCPU preempted check

2019-12-26 Thread kbuild test robot
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 patch is applied to the wrong git tree, please drop us a note to help

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

2019-12-26 Thread 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 doing busy waits for pre

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

2019-12-26 Thread 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 means the VCPU has bee

[PATCH v2 4/6] KVM: arm64: Provide VCPU attributes for PV lock

2019-12-26 Thread Zengruan Ye
Allow user space to inform the KVM host where in the physical memory map the paravirtualized lock structures should be located. User space can set an attribute on the VCPU providing the IPA base address of the PV lock structure for that VCPU. This must be repeated for every VCPU in the VM. The ad

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

2019-12-26 Thread 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. unix benchmark result:

[PATCH v2 2/6] KVM: arm64: Add SMCCC paravirtualised lock calls

2019-12-26 Thread Zengruan Ye
Add two new SMCCC compatible hypercalls for PV lock features: PV_LOCK_FEATURES: 0xC620 PV_LOCK_PREEMPTED: 0xC621 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-a

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

2019-12-26 Thread Zengruan Ye
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 is provided for the guest to interrogate the hypervisor's support for this interface and the location of the

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

2019-12-26 Thread 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 kernel can break the

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 >>