xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Igor Druzhinin <igor.druzhinin@citrix.com>
Cc: xen-devel@lists.xenproject.org, roger.pau@citrix.com, wl@xen.org,
	andrew.cooper3@citrix.com
Subject: Re: [Xen-devel] [PATCH] x86/time: update TSC stamp on restore from deep C-state
Date: Wed, 15 Jan 2020 13:54:24 +0100	[thread overview]
Message-ID: <a7300bce-4ebb-da65-9737-3a23f51fca39@suse.com> (raw)
In-Reply-To: <b8b5f2f3-74ab-d874-5f11-de4d5a9ec941@citrix.com>

On 15.01.2020 13:47, Igor Druzhinin wrote:
> On 15/01/2020 12:39, Jan Beulich wrote:
>> On 15.01.2020 13:28, Igor Druzhinin wrote:
>>> On 15/01/2020 11:32, Jan Beulich wrote:
>>>> On 14.01.2020 20:36, Igor Druzhinin wrote:
>>>>> If ITSC is not available on CPU (e.g if running nested as PV shim)
>>>>> then X86_FEATURE_NONSTOP_TSC is not advertised in certain cases, i.e.
>>>>> all AMD and some old Intel processors. In which case TSC would need to
>>>>> be restored on CPU from platform time by Xen upon exiting deep C-states.
>>>>
>>>> How does waking from deep C states correspond to the PV shim? I notice
>>>> that cstate_restore_tsc() gets called irrespective of the C state being
>>>> exited, so I wonder whether there's room for improvement there
>>>> independent of the issue at hand. As far as this change is concerned,
>>>> I think you want to drop the notion of "deep" from the description.
>>>
>>> I'm not familiar with what to call "deep C-state" so for me it was anything
>>> higher than C1. If you prefer "deep" to be dropped - so be it.
>>
>> "Higher than C1" may be fine (albeit I vaguely recall TSC issues
>> starting with C3 only), but at least mwait_idle() calls the
>> function even for C1. As to the PV shim - does it know about any
>> C-states at all (beyond HLT-invoked C1)?
> 
> Yes, PV-shim knows about C states as it looks they are tied to
> processor ID in some cases. For AMD specifically C2 is HLT.

The AMD part is pretty new, and is - afaict - an exception compared
to everything else. Under PVH there's no respective ACPI data (iirc),
and we also don't surface MONITOR/MWAIT to HVM/PVH guests, making
mwait_idle_probe() bail early. I wonder whether this special
behavior on AMD Fam17 should be suppressed in this case.

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2020-01-15 12:54 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-14 19:36 [Xen-devel] [PATCH] x86/time: update TSC stamp on restore from deep C-state Igor Druzhinin
2020-01-15  9:47 ` Roger Pau Monné
2020-01-15 11:40   ` Jan Beulich
2020-01-15 11:53     ` Roger Pau Monné
2020-01-15 12:49       ` Jan Beulich
2020-01-15 13:44         ` Roger Pau Monné
2020-01-15 16:21           ` Jan Beulich
2020-01-16  9:33             ` Roger Pau Monné
2020-01-16  9:38               ` Jan Beulich
2020-01-16 12:09                 ` Igor Druzhinin
2020-01-16 12:25                   ` Roger Pau Monné
2020-01-15 12:25     ` Igor Druzhinin
2020-01-15 12:31       ` Igor Druzhinin
2020-01-15 12:41         ` Jan Beulich
2020-01-15 12:36   ` Igor Druzhinin
2020-01-15 13:23     ` Roger Pau Monné
2020-01-15 14:45       ` Igor Druzhinin
2020-01-15 11:32 ` Jan Beulich
2020-01-15 12:28   ` Igor Druzhinin
2020-01-15 12:39     ` Jan Beulich
2020-01-15 12:47       ` Igor Druzhinin
2020-01-15 12:54         ` Jan Beulich [this message]
2020-01-15 14:55           ` Andrew Cooper

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=a7300bce-4ebb-da65-9737-3a23f51fca39@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=igor.druzhinin@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.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 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).