From: Alexander Graf <agraf@suse.de>
To: Paolo Bonzini <pbonzini@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Cc: "Jim Mattson" <jmattson@google.com>,
"kvm list" <kvm@vger.kernel.org>,
"Radim Krčmář" <rkrcmar@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
"Gabriel L. Somlo" <gsomlo@gmail.com>,
"Jonathan Corbet" <corbet@lwn.net>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
"H. Peter Anvin" <hpa@zytor.com>,
"the arch/x86 maintainers" <x86@kernel.org>,
"Joerg Roedel" <joro@8bytes.org>,
linux-doc@vger.kernel.org, qemu-devel@nongnu.org
Subject: Re: [PATCH v6] kvm: better MWAIT emulation for guests
Date: Fri, 21 Apr 2017 12:05:10 +0200 [thread overview]
Message-ID: <03f26e4b-6355-602a-f817-2c1ab38de199@suse.de> (raw)
In-Reply-To: <f1046a02-d42d-0b0b-47e0-f1055788a13b@redhat.com>
On 21.04.17 12:02, Paolo Bonzini wrote:
>
>
> On 12/04/2017 18:29, Michael S. Tsirkin wrote:
>> I don't really agree we do not need the PV flag. mwait on kvm is
>> different from mwait on bare metal in that you are heavily penalized by
>> scheduler for polling unless you configure the host just so.
>> HLT lets you give up the host CPU if you know you won't need
>> it for a long time.
>>
>> So while many people can get by with monitor cpuid (those that isolate
>> host CPUs) and it's a valuable option to have, I think a PV flag is also
>> a valuable option and can be set for more configurations.
>>
>> Guest has an idle driver calling mwait on short waits and halt on longer
>> ones. I'm in fact testing an idle driver using such a PV flag and will
>> post when ready (after vacation ~3 weeks from now probably).
>
> For now I think I'm removing the PV flag, making this just an
> optimization of commit 87c00572ba05aa8c ("kvm: x86: emulate
> monitor and mwait instructions as nop").
>
> We can add it for 4.13 together with the idle driver.
I think that's a perfectly reasonable approach, yes. We can always add
the PV flag with the driver.
Thanks a lot!
Alex
WARNING: multiple messages have this Message-ID (diff)
From: Alexander Graf <agraf@suse.de>
To: Paolo Bonzini <pbonzini@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Cc: "Jim Mattson" <jmattson@google.com>,
"kvm list" <kvm@vger.kernel.org>,
"Radim Krčmář" <rkrcmar@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
"Gabriel L. Somlo" <gsomlo@gmail.com>,
"Jonathan Corbet" <corbet@lwn.net>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
"H. Peter Anvin" <hpa@zytor.com>,
"the arch/x86 maintainers" <x86@kernel.org>,
"Joerg Roedel" <joro@8bytes.org>,
linux-doc@vger.kernel.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v6] kvm: better MWAIT emulation for guests
Date: Fri, 21 Apr 2017 12:05:10 +0200 [thread overview]
Message-ID: <03f26e4b-6355-602a-f817-2c1ab38de199@suse.de> (raw)
In-Reply-To: <f1046a02-d42d-0b0b-47e0-f1055788a13b@redhat.com>
On 21.04.17 12:02, Paolo Bonzini wrote:
>
>
> On 12/04/2017 18:29, Michael S. Tsirkin wrote:
>> I don't really agree we do not need the PV flag. mwait on kvm is
>> different from mwait on bare metal in that you are heavily penalized by
>> scheduler for polling unless you configure the host just so.
>> HLT lets you give up the host CPU if you know you won't need
>> it for a long time.
>>
>> So while many people can get by with monitor cpuid (those that isolate
>> host CPUs) and it's a valuable option to have, I think a PV flag is also
>> a valuable option and can be set for more configurations.
>>
>> Guest has an idle driver calling mwait on short waits and halt on longer
>> ones. I'm in fact testing an idle driver using such a PV flag and will
>> post when ready (after vacation ~3 weeks from now probably).
>
> For now I think I'm removing the PV flag, making this just an
> optimization of commit 87c00572ba05aa8c ("kvm: x86: emulate
> monitor and mwait instructions as nop").
>
> We can add it for 4.13 together with the idle driver.
I think that's a perfectly reasonable approach, yes. We can always add
the PV flag with the driver.
Thanks a lot!
Alex
next prev parent reply other threads:[~2017-04-21 10:05 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-11 11:45 [PATCH v6] kvm: better MWAIT emulation for guests Alexander Graf
2017-04-11 11:45 ` [Qemu-devel] " Alexander Graf
2017-04-11 12:41 ` Gabriel L. Somlo
2017-04-11 12:41 ` [Qemu-devel] " Gabriel L. Somlo
2017-04-11 12:43 ` Gabriel L. Somlo
2017-04-11 12:43 ` [Qemu-devel] " Gabriel L. Somlo
2017-04-11 12:43 ` Alexander Graf
2017-04-11 12:43 ` [Qemu-devel] " Alexander Graf
2017-04-11 17:10 ` Jim Mattson
2017-04-11 17:10 ` [Qemu-devel] " Jim Mattson
2017-04-11 18:23 ` Alexander Graf
2017-04-11 18:23 ` [Qemu-devel] " Alexander Graf
2017-04-12 14:34 ` Jim Mattson
2017-04-12 14:34 ` [Qemu-devel] " Jim Mattson
2017-04-12 14:54 ` Alexander Graf
2017-04-12 14:54 ` [Qemu-devel] " Alexander Graf
2017-04-12 15:20 ` Jim Mattson
2017-04-12 15:20 ` [Qemu-devel] " Jim Mattson
2017-04-12 16:29 ` Michael S. Tsirkin
2017-04-12 16:29 ` [Qemu-devel] " Michael S. Tsirkin
2017-04-21 10:02 ` Paolo Bonzini
2017-04-21 10:02 ` [Qemu-devel] " Paolo Bonzini
2017-04-21 10:05 ` Alexander Graf [this message]
2017-04-21 10:05 ` Alexander Graf
2017-04-21 10:06 ` Paolo Bonzini
2017-04-21 10:06 ` [Qemu-devel] " Paolo Bonzini
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=03f26e4b-6355-602a-f817-2c1ab38de199@suse.de \
--to=agraf@suse.de \
--cc=corbet@lwn.net \
--cc=gsomlo@gmail.com \
--cc=hpa@zytor.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rkrcmar@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.