From: "Jan Beulich" <JBeulich@novell.com>
To: Keir Fraser <keir.xen@gmail.com>, Kevin Tian <kevin.tian@intel.com>
Cc: xen devel <xen-devel@lists.xensource.com>
Subject: RE: [PATCH] x86, cpuidle: remove assertion on X86_FEATURE_TSC_RELIABLE
Date: Fri, 13 May 2011 09:17:47 +0100 [thread overview]
Message-ID: <4DCD054B02000078000412E0@vpn.id2.novell.com> (raw)
In-Reply-To: <625BA99ED14B2D499DC4E29D8138F1505C8F0A4B6E@shsmsx502.ccr.corp.intel.com>
>>> On 13.05.11 at 09:28, "Tian, Kevin" <kevin.tian@intel.com> wrote:
>> From: Jan Beulich [mailto:JBeulich@novell.com]
>> Sent: Friday, May 13, 2011 3:14 PM
>>
>> >>> On 13.05.11 at 07:55, Keir Fraser <keir.xen@gmail.com> wrote:
>> > On 13/05/2011 03:45, "Tian, Kevin" <kevin.tian@intel.com> wrote:
>> >
>> >> x86, cpuidle: remove assertion on X86_FEATURE_TSC_RELIABLE
>> >>
>> >> 23228:1329d99b4f16 disables deep cstate to avoid restoring tsc when
>> >> tsc msr is not writtable on some old platform, which however also
>> >> adds an assertion on X86_FEATURE_TSC_RELIABLE in cstate_restore_tsc.
>> >> The two don't match as tsc writtable-ness has nothing to do with
>> >> whether it's reliable. As long as Xen can use tsc as the time source
>> >> and it's writable, it should be OK to continue using deep cstate with
>> >> tsc save/restore.
>> >
>> > Looks like I just got the assertion the wrong way round, should be
>> > ASSERT(!boot_cpu_has(X86_FEATURE_TSC_RELIABLE)).
>>
>> No, the assertion is correct imo (since tsc_check_writability() bails
> immediately
>> when boot_cpu_has(X86_FEATURE_TSC_RELIABLE)).
>
> here we may need a definition about what a reliable TSC means here. no tsc
> skew
> among cpus, or stably incremented on the bus clock? It looks that we have
> some
> assumption behind various TSC flags, and use them with implicit assumptions.
> Here I can see that tsc_check_writability may disable deep cstate when it's
> not
> writable, but it doesn't mean that the assertion on X86_FEATURE_TSC_RELIABLE
> is correct since even when this flag is cleared the tsc could still be
> writable. That
> way the assertion absolutely is wrong.
>
>>
>> But the problem Kevin reports is exactly what I expected when we discussed
>> the whole change. Nevertheless, simply removing the assertion won't be
>> correct - instead your addition of the early bail out on TSC_RELIABLE is what
> I'd
>> now put under question (the comment that goes with it, as we now see, isn't
>> correct).
>>
>
> I still don't understand why deep cstate must be disabled when TSC is not
> reliable.
> Also the early bail out doesn't impact my error, since in my case
> TSC_RELIABLE is
> not set but it's simply writable.
My point is that for the assertion to be removed, the early bail in
tsc_check_writability() must be removed too.
Jan
next prev parent reply other threads:[~2011-05-13 8:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-13 2:45 [PATCH] x86, cpuidle: remove assertion on X86_FEATURE_TSC_RELIABLE Tian, Kevin
2011-05-13 5:55 ` Keir Fraser
2011-05-13 6:01 ` Tian, Kevin
2011-05-13 7:14 ` Jan Beulich
2011-05-13 7:28 ` Tian, Kevin
2011-05-13 8:17 ` Jan Beulich [this message]
2011-05-13 8:29 ` Keir Fraser
2011-05-13 8:49 ` Tian, Kevin
2011-05-13 9:15 ` Keir Fraser
2011-05-13 9:42 ` Jan Beulich
2011-05-17 0:51 ` Tian, Kevin
2011-05-13 17:16 ` Dan Magenheimer
2011-05-17 0:50 ` Tian, Kevin
2011-05-17 7:58 ` Keir Fraser
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=4DCD054B02000078000412E0@vpn.id2.novell.com \
--to=jbeulich@novell.com \
--cc=keir.xen@gmail.com \
--cc=kevin.tian@intel.com \
--cc=xen-devel@lists.xensource.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;
as well as URLs for NNTP newsgroup(s).