xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>,
	"Igor Druzhinin" <igor.druzhinin@citrix.com>
Cc: xen-devel@lists.xenproject.org, wl@xen.org, andrew.cooper3@citrix.com
Subject: Re: [Xen-devel] [PATCH] x86/time: update TSC stamp on restore from deep C-state
Date: Thu, 16 Jan 2020 10:38:10 +0100	[thread overview]
Message-ID: <b7a410db-5305-dc52-775b-88f07740bf5a@suse.com> (raw)
In-Reply-To: <20200116093354.GP11756@Air-de-Roger>

On 16.01.2020 10:33, Roger Pau Monné wrote:
> On Wed, Jan 15, 2020 at 05:21:16PM +0100, Jan Beulich wrote:
>> On 15.01.2020 14:44, Roger Pau Monné wrote:
>>> On Wed, Jan 15, 2020 at 01:49:22PM +0100, Jan Beulich wrote:
>>>> What I'm then worried about is too
>>>> little progress observable by guests. The PV time protocol
>>>> ought to be fine in this regard (and consumers of raw TSC values
>>>> are on their own anyway), but wouldn't you need to update TSC
>>>> offsets of HVM guests in order to compensate for the elapsed
>>>> time?
>>>
>>> That will be done when the HVM vCPU gets scheduled in as part of the
>>> update_vcpu_system_time call AFAICT. cstate_restore_tsc will always be
>>> called with the idle vCPU context, and hence there's always going to
>>> be a vCPU switch before scheduling anything else.
>>
>> Which step would this be? All I see is a call to hvm_scale_tsc().
>> In time.c only tsc_set_info() calls hvm_set_tsc_offset().
> 
> My bad, I've mistaken the scaling with the offset.
> 
> Accounting for the offset in update_vcpu_system_time seems quite
> more complicated that just updating the TSC here, so:
> 
> Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

And then (preferably with "deep" dropped from the description,
if you, Igor, agree, and which can be done while committing)
Acked-by: Jan Beulich <jbeulich@suse.com>

Jan

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

  reply	other threads:[~2020-01-16  9:38 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 [this message]
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
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=b7a410db-5305-dc52-775b-88f07740bf5a@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).