All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: kevin.tian@intel.com, eddie.dong@intel.com,
	jun.nakajima@intel.com, suravee.suthikulpanit@amd.com,
	xen-devel@lists.xen.org
Subject: Re: [PATCH v4 1/3] x86: Use native RDTSC(P) execution when guest and host frequencies are the same
Date: Wed, 16 Apr 2014 09:02:10 -0400	[thread overview]
Message-ID: <534E7F52.4040406@oracle.com> (raw)
In-Reply-To: <534E6F7A0200007800009670@nat28.tlf.novell.com>

On 04/16/2014 05:54 AM, Jan Beulich wrote:
>>>> On 16.04.14 at 03:27, <boris.ostrovsky@oracle.com> wrote:
>> @@ -1889,10 +1890,14 @@ void tsc_set_info(struct domain *d,
>>           d->arch.vtsc_offset = get_s_time() - elapsed_nsec;
>>           d->arch.tsc_khz = gtsc_khz ? gtsc_khz : cpu_khz;
>>           set_time_scale(&d->arch.vtsc_to_ns, d->arch.tsc_khz * 1000 );
>> -        /* use native TSC if initial host has safe TSC, has not migrated
>> -         * yet and tsc_khz == cpu_khz */
>> -        if ( host_tsc_is_safe() && incarnation == 0 &&
>> -                d->arch.tsc_khz == cpu_khz )
>> +        /*
>> +         * Use native TSC if initial host has safe TSC and either has not
>> +         * migrated yet or tsc_khz == cpu_khz (either "naturally" or via
>> +         * TSC scaling)
>> +         */
>> +        if ( host_tsc_is_safe() &&
>> +             (incarnation == 0 || d->arch.tsc_khz == cpu_khz ||
>> +              cpu_has_tsc_ratio) )
> Can't you drop checking incarnation to be zero then? In that case,
> afaict d->arch.tsc_khz == cpu_khz due to gtsc_khz being passed
> in as zero from arch_domain_create().

Yes, it's pointless. I was thinking that maybe toolstack may pass 
gtsc_khz != cpu_khz during initial boot (it doesn't do it now, but 
theoretically it could) but then we shouldn't be using vtsc=0 in that 
case anyway.

-boris

  reply	other threads:[~2014-04-16 13:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16  1:27 [PATCH v4 0/3] Time-related fixes for migration Boris Ostrovsky
2014-04-16  1:27 ` [PATCH v4 1/3] x86: Use native RDTSC(P) execution when guest and host frequencies are the same Boris Ostrovsky
2014-04-16  9:54   ` Jan Beulich
2014-04-16 13:02     ` Boris Ostrovsky [this message]
2014-04-16 11:38   ` Jan Beulich
2014-04-16 14:28     ` Boris Ostrovsky
2014-04-16 14:37       ` Jan Beulich
2014-04-16 15:33         ` Boris Ostrovsky
2014-04-16 16:15           ` Jan Beulich
2014-04-16 16:44             ` Boris Ostrovsky
2014-04-17  6:29               ` Jan Beulich
2014-04-16  1:27 ` [PATCH v4 2/3] x86/svn: Enable TSC scaling Boris Ostrovsky
2014-04-16 10:21   ` Jan Beulich
2014-04-16 10:53   ` Andrew Cooper
2014-04-16  1:27 ` [PATCH v4 3/3] x86/HVM: Use fixed TSC value when saving or restoring domain Boris Ostrovsky
2014-04-16 10:22   ` Jan Beulich

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=534E7F52.4040406@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=eddie.dong@intel.com \
    --cc=jun.nakajima@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=xen-devel@lists.xen.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 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.