From: "Jan Beulich" <JBeulich@suse.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: andrew.cooper3@citrix.com, xen-devel@lists.xen.org
Subject: Re: [PATCH] x86/time: Don't use virtual TSC if host and guest frequencies are equal
Date: Thu, 16 Mar 2017 04:40:33 -0600 [thread overview]
Message-ID: <58CA79B10200007800143AE0@prv-mh.provo.novell.com> (raw)
In-Reply-To: <1489607321-6295-1-git-send-email-boris.ostrovsky@oracle.com>
>>> On 15.03.17 at 20:48, <boris.ostrovsky@oracle.com> wrote:
> --- a/xen/arch/x86/time.c
> +++ b/xen/arch/x86/time.c
> @@ -2051,17 +2051,11 @@ void tsc_set_info(struct domain *d,
> d->arch.vtsc_offset = get_s_time() - elapsed_nsec;
> d->arch.tsc_khz = gtsc_khz ?: cpu_khz;
> set_time_scale(&d->arch.vtsc_to_ns, d->arch.tsc_khz * 1000);
> - /*
> - * In default mode use native TSC if the host has safe TSC and:
> - * HVM/PVH: host and guest frequencies are the same (either
> - * "naturally" or via TSC scaling)
> - * PV: guest has not migrated yet (and thus arch.tsc_khz == cpu_khz)
> - */
> +
> if ( tsc_mode == TSC_MODE_DEFAULT && host_tsc_is_safe() &&
> - (has_hvm_container_domain(d) ?
> - (d->arch.tsc_khz == cpu_khz ||
> - hvm_get_tsc_scaling_ratio(d->arch.tsc_khz)) :
> - incarnation == 0) )
> + (d->arch.tsc_khz == cpu_khz || incarnation == 0 ||
Is the incarnation comparison really needed here, i.e. doesn't it
being zero imply the two frequencies to match in default mode?
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-03-16 10:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-15 19:48 [PATCH] x86/time: Don't use virtual TSC if host and guest frequencies are equal Boris Ostrovsky
2017-03-16 10:40 ` Jan Beulich [this message]
2017-03-16 12:44 ` Boris Ostrovsky
2017-03-16 13:31 ` Jan Beulich
2017-03-16 14:22 ` Boris Ostrovsky
2017-03-16 15:34 ` 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=58CA79B10200007800143AE0@prv-mh.provo.novell.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.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.