xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Keir Fraser <keir.xen@gmail.com>
To: Jan Beulich <JBeulich@novell.com>
Cc: Kevin Tian <kevin.tian@intel.com>,
	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:29:27 +0100	[thread overview]
Message-ID: <C9F2AA77.1A3B2%keir.xen@gmail.com> (raw)
In-Reply-To: <4DCCF65802000078000412A4@vpn.id2.novell.com>

On 13/05/2011 08:14, "Jan Beulich" <JBeulich@novell.com> wrote:

>> 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)).

The current idea of TSC_RELIABLE is it means the platform ensures that all
TSCs are in lock step, at constant rate, never stopping even in C3. Hence we
don't need to modify TSCs, hence we don't need to check TSC writability. And
also, hence we shouldn't get to the write_tsc() in cstate_restore_tsc()
(since TSC_RELIABLE should imply NONSTOP_TSC, and hence we should bail early
from cstate_restore_tsc()).

> But the problem Kevin reports is exactly what I expected when
> we discussed the whole change.

Well I don't understand that.

Nevertheless, I feel I'm playing devil's advocate here and batting on DanM's
side for something I don't consider a major issue. If someone wants to clean
this up and come up with (possibly different and new) documented and
consistently applied semantics for these TSC feature flags, please go ahead
and propose it. And we'll see who comes out to care and bat against it.

As it is, I'm still of the opinion that the smallest correct fix would be to
invert the assertion predicate.

 -- Keir

> 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).

  parent reply	other threads:[~2011-05-13  8:29 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
2011-05-13  8:29     ` Keir Fraser [this message]
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=C9F2AA77.1A3B2%keir.xen@gmail.com \
    --to=keir.xen@gmail.com \
    --cc=JBeulich@novell.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).