Re: [PATCH RESEND] KVM: Boosting vCPUs that are delivering interrupts

2019-07-18 Thread Wanpeng Li
On Thu, 18 Jul 2019 at 17:39, Paolo Bonzini wrote: > > On 18/07/19 11:29, Wanpeng Li wrote: > > On Thu, 18 Jul 2019 at 17:07, Paolo Bonzini wrote: > >> > >> On 18/07/19 10:43, Wanpeng Li wrote: > > Isnt that done by the sched_in handler? > > I am a bit confused because, if it is don

Re: [PATCH RESEND] KVM: Boosting vCPUs that are delivering interrupts

2019-07-18 Thread Paolo Bonzini
On 18/07/19 11:29, Wanpeng Li wrote: > On Thu, 18 Jul 2019 at 17:07, Paolo Bonzini wrote: >> >> On 18/07/19 10:43, Wanpeng Li wrote: > Isnt that done by the sched_in handler? I am a bit confused because, if it is done by the sched_in later, I don't understand why the sched_out h

Re: [PATCH RESEND] KVM: Boosting vCPUs that are delivering interrupts

2019-07-18 Thread Wanpeng Li
On Thu, 18 Jul 2019 at 17:07, Paolo Bonzini wrote: > > On 18/07/19 10:43, Wanpeng Li wrote: > >>> Isnt that done by the sched_in handler? > >> > >> I am a bit confused because, if it is done by the sched_in later, I > >> don't understand why the sched_out handler hasn't set vcpu->preempted > >> al

Re: [PATCH RESEND] KVM: Boosting vCPUs that are delivering interrupts

2019-07-18 Thread Paolo Bonzini
On 18/07/19 10:43, Wanpeng Li wrote: >>> Isnt that done by the sched_in handler? >> >> I am a bit confused because, if it is done by the sched_in later, I >> don't understand why the sched_out handler hasn't set vcpu->preempted >> already. >> >> The s390 commit message is not very clear, but it tal

Re: [PATCH RESEND] KVM: Boosting vCPUs that are delivering interrupts

2019-07-18 Thread Wanpeng Li
On Thu, 18 Jul 2019 at 16:34, Paolo Bonzini wrote: > > On 18/07/19 10:15, Christian Borntraeger wrote: > > > > > > On 18.07.19 09:59, Paolo Bonzini wrote: > >> On 12/07/19 09:15, Wanpeng Li wrote: > >>> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > >>> index b4ab59d..2c46705 100644 > >>

Re: [PATCH RESEND] KVM: Boosting vCPUs that are delivering interrupts

2019-07-18 Thread Paolo Bonzini
On 18/07/19 10:15, Christian Borntraeger wrote: > > > On 18.07.19 09:59, Paolo Bonzini wrote: >> On 12/07/19 09:15, Wanpeng Li wrote: >>> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c >>> index b4ab59d..2c46705 100644 >>> --- a/virt/kvm/kvm_main.c >>> +++ b/virt/kvm/kvm_main.c >>> @@ -24

Re: [PATCH RESEND] KVM: Boosting vCPUs that are delivering interrupts

2019-07-18 Thread Christian Borntraeger
On 18.07.19 09:59, Paolo Bonzini wrote: > On 12/07/19 09:15, Wanpeng Li wrote: >> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c >> index b4ab59d..2c46705 100644 >> --- a/virt/kvm/kvm_main.c >> +++ b/virt/kvm/kvm_main.c >> @@ -2404,8 +2404,10 @@ void kvm_vcpu_kick(struct kvm_vcpu *vcpu)

Re: [PATCH RESEND] KVM: Boosting vCPUs that are delivering interrupts

2019-07-18 Thread Paolo Bonzini
On 12/07/19 09:15, Wanpeng Li wrote: > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > index b4ab59d..2c46705 100644 > --- a/virt/kvm/kvm_main.c > +++ b/virt/kvm/kvm_main.c > @@ -2404,8 +2404,10 @@ void kvm_vcpu_kick(struct kvm_vcpu *vcpu) > int me; > int cpu = vcpu->cpu; > >

Re: [PATCH RESEND] KVM: Boosting vCPUs that are delivering interrupts

2019-07-17 Thread Wanpeng Li
Cc arm guy's latest email On Fri, 12 Jul 2019 at 15:15, Wanpeng Li wrote: > > From: Wanpeng Li > > Inspired by commit 9cac38dd5d (KVM/s390: Set preempted flag during vcpu wakeup > and interrupt delivery), except the lock holder, we want to also boost vCPUs > that are delivering interrupts. Actual

Re: [PATCH RESEND] KVM: Boosting vCPUs that are delivering interrupts

2019-07-12 Thread Wanpeng Li
On Fri, 12 Jul 2019 at 15:15, Wanpeng Li wrote: > > From: Wanpeng Li > > Inspired by commit 9cac38dd5d (KVM/s390: Set preempted flag during vcpu wakeup > and interrupt delivery), except the lock holder, we want to also boost vCPUs > that are delivering interrupts. Actually most smp_call_function_

[PATCH RESEND] KVM: Boosting vCPUs that are delivering interrupts

2019-07-12 Thread Wanpeng Li
From: Wanpeng Li Inspired by commit 9cac38dd5d (KVM/s390: Set preempted flag during vcpu wakeup and interrupt delivery), except the lock holder, we want to also boost vCPUs that are delivering interrupts. Actually most smp_call_function_many calls are synchronous ipi calls, the ipi target vCPU