From: Sarah Newman <srn@prgmr.com>
To: George Dunlap <george.dunlap@eu.citrix.com>,
Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Yanhai Zhu <zhu.yanhai@gmail.com>,
David Vrabel <david.vrabel@citrix.com>
Subject: Re: [PATCH] x86: Control CR0 TS behavior using dev_na_ts_allowed
Date: Tue, 18 Mar 2014 11:07:45 -0700 [thread overview]
Message-ID: <53288B71.8030703@prgmr.com> (raw)
In-Reply-To: <5327041E.2000205@eu.citrix.com>
On 03/17/2014 07:18 AM, George Dunlap wrote:
> On 03/17/2014 02:05 PM, George Dunlap wrote:
>> On 03/17/2014 01:35 PM, Jan Beulich wrote:
>>>>>> On 17.03.14 at 13:42, George Dunlap <George.Dunlap@eu.citrix.com> wrote:
>>>> On Mon, Mar 17, 2014 at 8:38 AM, Jan Beulich <JBeulich@suse.com> wrote:
>>>>>>>> On 17.03.14 at 04:30, Sarah Newman <srn@prgmr.com> wrote:
>>>>> Not being convinced at all that this is the right approach (in
>>>>> particular it remains unclear how an affected guest should deal with
>>>>> running on a hypervisor not supporting the new interface)
>>>> It looks like the intention of this patch was that if the dom0
>>>> administrator enables the new option, then it will be on by default,
>>>> *but* the guest can disable the new behavior. That way, if an admin
>>>> knows that she's running all PVOPS kernels (no "classic Xen" kernels),
>>>> she can enable it system-wide. Older PVOPS kernels will behave
>>>> correctly (but a bit slowly), and newer PVOPS kernels will switch to
>>>> the PVABI behavior and reap the performance benefit.
The guest cannot enable or disable this behavior but it can detect the behavior using CPUID. I
considered making the behavior configurable from within the guest, but did not find a clean way of
implementing it since any decision should really happen very early in the boot process. Suggestions
on how to do this are welcome.
>>>>
>>>> Newer PVOPS kernels running on older hypervisors will simply use the
>>>> PVABI behavior.
>>> But if that works correctly, then there's no hypervisor/tools
>>> change needed in the first place.
>>
>> Yes, there's still a need to run *old* PVOPS kernels on *new* hypervisors. That (as I understand
>> it) is the point of this patch.
My assumption is that the accepted linux fix will be more slow or use memory less effectively in
order to integrate well with other x86 implementations. So I would like new kernels to be able to
detect that they can use clts/stts safely and only use the workaround if they can't. This is why I
added a CPUID field that advertises nm_hardware_ts.
Given almost all of our customers run linux, my long term plan is turn this option on for everyone
by default and let individual users turn it off if they are running a classic kernel or a different
OS which is PVABI compliant.
>
> So we have old hypervisors, new hypervisors with this disabled, and new hypervisors with this
> enabled. New hypervisors with this disabled behave just like old hypervisors. And we have old
> pvops kernels, new pvops kernels, and "classic Xen" kernels. And we have "correctness" and
> "performance". Then we have the following combinations:
>
> * Old hypervisor / New hypervisor w/ mode disabled:
> - Old hypervisor, classic kernel: correct and fast.
Yes
> - Old hypervisor, old pvops kernel: fast but buggy.
Yes
> - Old hypervisor, new pvops kernel: correct and fast.
Likely not fast if eagerfpu is the solution instead of eager allocation or atomic allocation.
> * New hypervisor (w/ mode enabled):
> - classic kernel: broken (since it's expecting PVABI TS behavior)
Broken, yes
> - old pvops: correct but slow
Correct and as fast as it was, because its behavior will not change with regards to clts/stts.
> - new pvops kernel: correct and fast (since it will opt-in to the faster PVABI)
Correct and as fast as it was.
next prev parent reply other threads:[~2014-03-18 18:07 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-10 16:17 [PATCHv1] x86: don't schedule when handling #NM exception David Vrabel
2014-03-10 16:40 ` H. Peter Anvin
2014-03-10 16:40 ` H. Peter Anvin
2014-03-10 17:15 ` David Vrabel
2014-03-10 17:25 ` H. Peter Anvin
2014-03-10 17:25 ` H. Peter Anvin
2014-03-17 3:13 ` Sarah Newman
2014-03-17 3:13 ` Sarah Newman
2014-03-17 3:30 ` [PATCH] x86: Control CR0 TS behavior using dev_na_ts_allowed Sarah Newman
2014-03-17 8:38 ` Jan Beulich
2014-03-17 12:42 ` George Dunlap
2014-03-17 13:35 ` Jan Beulich
2014-03-17 14:05 ` George Dunlap
2014-03-17 14:18 ` George Dunlap
2014-03-17 15:28 ` Jan Beulich
2014-03-18 18:07 ` Sarah Newman [this message]
2014-03-18 19:14 ` David Vrabel
2014-03-17 12:44 ` George Dunlap
2014-03-17 13:35 ` Jan Beulich
2014-03-18 17:48 ` Sarah Newman
2014-03-17 3:32 ` [PATCH] x86, fpu, xen: Allocate fpu state for xen pv based on PVABI behavior Sarah Newman
2014-03-17 3:32 ` Sarah Newman
2014-03-17 3:33 ` [PATCHv1] x86: don't schedule when handling #NM exception H. Peter Anvin
2014-03-17 3:33 ` H. Peter Anvin
2014-03-17 3:35 ` Sarah Newman
2014-03-17 3:35 ` [Xen-devel] " Sarah Newman
2014-03-17 3:43 ` H. Peter Anvin
2014-03-17 3:43 ` [Xen-devel] " H. Peter Anvin
2014-03-17 4:12 ` Sarah Newman
2014-03-17 4:12 ` [Xen-devel] " Sarah Newman
2014-03-17 4:23 ` H. Peter Anvin
2014-03-17 4:23 ` [Xen-devel] " H. Peter Anvin
2014-03-20 0:00 ` Greg Kroah-Hartman
2014-03-20 2:29 ` H. Peter Anvin
2014-03-20 2:29 ` [Xen-devel] " H. Peter Anvin
2014-03-20 0:00 ` Greg Kroah-Hartman
2014-03-17 13:29 ` [Xen-devel] " David Vrabel
2014-03-19 13:21 ` Konrad Rzeszutek Wilk
2014-03-19 13:21 ` [Xen-devel] " Konrad Rzeszutek Wilk
2014-03-19 15:02 ` H. Peter Anvin
2014-06-23 13:08 ` Konrad Rzeszutek Wilk
2014-06-23 13:08 ` [Xen-devel] " Konrad Rzeszutek Wilk
2015-03-05 22:08 ` H. Peter Anvin
2015-03-05 22:08 ` [Xen-devel] " H. Peter Anvin
2015-03-06 11:46 ` [PATCHv4] x86, fpu: remove the logic of non-eager fpu mem allocation at the first usage David Vrabel
2015-03-06 11:46 ` David Vrabel
2014-03-19 15:02 ` [PATCHv1] x86: don't schedule when handling #NM exception H. Peter Anvin
2014-03-17 13:29 ` David Vrabel
2014-03-17 12:19 ` George Dunlap
2014-03-17 12:19 ` [Xen-devel] " George Dunlap
2014-03-17 16:55 ` H. Peter Anvin
2014-03-17 17:05 ` Jan Beulich
2014-03-17 17:05 ` [Xen-devel] " Jan Beulich
2014-03-17 17:12 ` H. Peter Anvin
2014-03-18 8:14 ` Ingo Molnar
2014-03-18 8:14 ` [Xen-devel] " Ingo Molnar
2014-03-17 17:12 ` H. Peter Anvin
2014-03-17 17:14 ` George Dunlap
2014-03-17 17:14 ` [Xen-devel] " George Dunlap
2014-03-18 18:17 ` Sarah Newman
2014-03-18 18:27 ` H. Peter Anvin
2014-03-18 18:27 ` H. Peter Anvin
2014-03-18 18:17 ` Sarah Newman
2014-03-17 16:55 ` H. Peter Anvin
2014-03-10 17:15 ` David Vrabel
2014-03-10 16:45 ` H. Peter Anvin
2014-03-10 16:45 ` H. Peter Anvin
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=53288B71.8030703@prgmr.com \
--to=srn@prgmr.com \
--cc=JBeulich@suse.com \
--cc=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=xen-devel@lists.xenproject.org \
--cc=zhu.yanhai@gmail.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 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.