Re: [PATCH] KVM: Disable wake-affine vCPU process to mitigate lock holder preemption

2019-08-02 Thread Paolo Bonzini
On 01/08/19 14:57, Dario Faggioli wrote: > Can't we achieve this by removing SD_WAKE_AFFINE from the relevant > scheduling domains? By acting on > /proc/sys/kernel/sched_domain/cpuX/domainY/flags, I mean? > > Of course this will impact all tasks, not only KVM vcpus. But if the > host does KVM

Re: [PATCH] KVM: Disable wake-affine vCPU process to mitigate lock holder preemption

2019-08-02 Thread Christophe de Dinechin
Dario Faggioli writes: > On Tue, 2019-07-30 at 17:33 +0800, Wanpeng Li wrote: >> However, in multiple VMs over-subscribe virtualization scenario, it >> increases >> the probability to incur vCPU stacking which means that the sibling >> vCPUs from >> the same VM will be stacked on one pCPU. I

Re: [PATCH] KVM: Disable wake-affine vCPU process to mitigate lock holder preemption

2019-08-01 Thread Wanpeng Li
On Thu, 1 Aug 2019 at 20:57, Dario Faggioli wrote: > > On Tue, 2019-07-30 at 17:33 +0800, Wanpeng Li wrote: > > However, in multiple VMs over-subscribe virtualization scenario, it > > increases > > the probability to incur vCPU stacking which means that the sibling > > vCPUs from > > the same VM

Re: [PATCH] KVM: Disable wake-affine vCPU process to mitigate lock holder preemption

2019-08-01 Thread Dario Faggioli
On Tue, 2019-07-30 at 17:33 +0800, Wanpeng Li wrote: > However, in multiple VMs over-subscribe virtualization scenario, it > increases > the probability to incur vCPU stacking which means that the sibling > vCPUs from > the same VM will be stacked on one pCPU. I test three 80 vCPUs VMs > running

Re: [PATCH] KVM: Disable wake-affine vCPU process to mitigate lock holder preemption

2019-08-01 Thread Dario Faggioli
On Tue, 2019-07-30 at 13:46 +0200, Paolo Bonzini wrote: > On 30/07/19 11:33, Wanpeng Li wrote: > > When qemu/other vCPU inject virtual interrupt to guest through > > waking up one > > sleeping vCPU, it increases the probability to stack vCPUs/qemu by > > scheduler > > wake-affine. vCPU stacking

Re: [PATCH] KVM: Disable wake-affine vCPU process to mitigate lock holder preemption

2019-07-30 Thread Peter Zijlstra
On Tue, Jul 30, 2019 at 05:33:55PM +0800, Wanpeng Li wrote: > From: Wanpeng Li > > Wake-affine is a feature inside scheduler which we attempt to make processes > running closely, it gains benefit mostly from cache-hit. When waker tries > to wakup wakee, it needs to select cpu to run wakee,

Re: [PATCH] KVM: Disable wake-affine vCPU process to mitigate lock holder preemption

2019-07-30 Thread Paolo Bonzini
On 30/07/19 11:33, Wanpeng Li wrote: > When qemu/other vCPU inject virtual interrupt to guest through waking up one > sleeping vCPU, it increases the probability to stack vCPUs/qemu by scheduler > wake-affine. vCPU stacking issue can greately inceases the lock > synchronization > latency in a

[PATCH] KVM: Disable wake-affine vCPU process to mitigate lock holder preemption

2019-07-30 Thread Wanpeng Li
From: Wanpeng Li Wake-affine is a feature inside scheduler which we attempt to make processes running closely, it gains benefit mostly from cache-hit. When waker tries to wakup wakee, it needs to select cpu to run wakee, wake affine heuristic mays select the cpu which waker is running on