From: Paolo Bonzini <pbonzini@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: "Roman Kagan" <rkagan@virtuozzo.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
kvm@vger.kernel.org, "Denis Lunev" <den@virtuozzo.com>
Subject: Re: [PATCH 3/5] kvm: kick vcpu when async_pf is resolved
Date: Fri, 2 Dec 2016 04:40:20 -0500 (EST) [thread overview]
Message-ID: <470947109.1168244.1480671620210.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <b82952a0-0d5b-cfa7-8ff2-6bd056bcb00d@de.ibm.com>
----- Original Message -----
> From: "Christian Borntraeger" <borntraeger@de.ibm.com>
> To: "Roman Kagan" <rkagan@virtuozzo.com>, "Radim Krčmář" <rkrcmar@redhat.com>, "Paolo Bonzini" <pbonzini@redhat.com>,
> kvm@vger.kernel.org
> Cc: "Denis Lunev" <den@virtuozzo.com>
> Sent: Friday, December 2, 2016 10:35:02 AM
> Subject: Re: [PATCH 3/5] kvm: kick vcpu when async_pf is resolved
>
> On 12/02/2016 09:47 AM, Roman Kagan wrote:
> > When async_pf is ready the guest needs to be made aware of it ASAP,
> > because it may be holding off a higher priority task pending the
> > async_pf resolution in favor of a lower priority one.
> >
> > In case async_pf's are harvested in vcpu context (x86) we have to not
> > only wake the vcpu up but kick it into host.
> >
> > While at this, also replace the open-coded vcpu wakeup by the existing
> > helper.
> >
> > Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
> > ---
> > virt/kvm/async_pf.c | 7 +++++--
> > 1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/virt/kvm/async_pf.c b/virt/kvm/async_pf.c
> > index 9cced14..5f0a66c 100644
> > --- a/virt/kvm/async_pf.c
> > +++ b/virt/kvm/async_pf.c
> > @@ -105,8 +105,11 @@ static void async_pf_execute(struct work_struct *work)
> > * This memory barrier pairs with prepare_to_wait's set_current_state()
> > */
> > smp_mb();
> > - if (swait_active(&vcpu->wq))
> > - swake_up(&vcpu->wq);
> > +#ifdef CONFIG_KVM_ASYNC_PF_SYNC
> > + kvm_vcpu_wake_up(vcpu);
> > +#else
> > + kvm_vcpu_kick(vcpu);
> > +#endif
>
> This will break s390, both functions are disabled for s390.
> On s390 do not want to kick the CPU for a completion. Instead we implement
> the kvm_async_page_present_sync call above and handle completion via an
> "pfault done" interrupt via the normal interrupt delivery.
Is there any reason (with this patch) to disable kvm_vcpu_wake_up on s390?
It was unused until now, but the patch makes sense as a cleanup.
Paolo
next prev parent reply other threads:[~2016-12-02 9:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-02 8:47 [PATCH 0/5] kvm: avoid delaying async_pf ready delivery Roman Kagan
2016-12-02 8:47 ` [PATCH 1/5] kvm/x86: fix inversed check for async_pf MSR Roman Kagan
2016-12-02 8:47 ` [PATCH 2/5] kvm: add helper for testing ready async_pf's Roman Kagan
2016-12-02 8:47 ` [PATCH 3/5] kvm: kick vcpu when async_pf is resolved Roman Kagan
2016-12-02 9:35 ` Christian Borntraeger
2016-12-02 9:40 ` Paolo Bonzini [this message]
2016-12-02 10:00 ` Christian Borntraeger
2016-12-02 11:34 ` Roman Kagan
2016-12-05 8:08 ` Christian Borntraeger
2016-12-02 11:28 ` Roman Kagan
2016-12-03 4:02 ` kbuild test robot
2016-12-06 11:05 ` kbuild test robot
2016-12-02 8:47 ` [PATCH 4/5] kvm/vmx: kick L2 guest to L1 by ready async_pf Roman Kagan
2016-12-02 8:47 ` [PATCH 5/5] kvm/svm: " Roman Kagan
2016-12-02 9:35 ` Paolo Bonzini
2016-12-02 12:33 ` Roman Kagan
2016-12-12 12:40 ` Roman Kagan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=470947109.1168244.1480671620210.JavaMail.zimbra@redhat.com \
--to=pbonzini@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=den@virtuozzo.com \
--cc=kvm@vger.kernel.org \
--cc=rkagan@virtuozzo.com \
--cc=rkrcmar@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox