All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Olaf Hering <olaf@aepfle.de>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH] xen: preserve native TSC speed during migration between identical hosts
Date: Mon, 29 May 2017 08:50:23 -0600	[thread overview]
Message-ID: <592C514F020000780015D542@prv-mh.provo.novell.com> (raw)
In-Reply-To: <20170524142505.11460-1-olaf@aepfle.de>

>>> On 24.05.17 at 16:25, <olaf@aepfle.de> wrote:
> @@ -2024,6 +2029,13 @@ 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);
> +        if (!opt_vtsc_tolerance) {
> +            tolerated = d->arch.tsc_khz == cpu_khz;
> +        } else {

Leaving aside the question of whether we want anything like this,
there are multiple coding style issues here (braces on their own
lines, blanks inside the parentheses of control statements). 

> +            khz_diff = cpu_khz > d->arch.tsc_khz ?
> +                       cpu_khz - d->arch.tsc_khz : d->arch.tsc_khz - cpu_khz;
> +            tolerated = khz_diff <= opt_vtsc_tolerance;
> +        }

These assignments to tolerated also suggest it wants to be bool.

Finally I don't think a host wide option will do. If it is to be of use
(considering that it used wrong may break applications), it needs
to be per-domain, and its value needs to be migrated (perhaps
in the form of a low/high pair of TSC frequency values).

Jan


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

  parent reply	other threads:[~2017-05-29 14:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-24 14:25 [PATCH] xen: preserve native TSC speed during migration between identical hosts Olaf Hering
2017-05-24 15:09 ` Konrad Rzeszutek Wilk
2017-05-24 15:25   ` Olaf Hering
2017-05-24 15:33     ` Konrad Rzeszutek Wilk
2017-05-24 15:44       ` Olaf Hering
2017-05-29 14:45       ` Jan Beulich
2017-05-30  6:36         ` Olaf Hering
2017-05-30  7:25           ` Jan Beulich
2017-05-30  9:27       ` Olaf Hering
2017-05-30 14:28         ` Konrad Rzeszutek Wilk
2017-05-29 14:50 ` Jan Beulich [this message]
2017-05-30  6:41   ` Olaf Hering
2017-05-30  7:27     ` 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=592C514F020000780015D542@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=olaf@aepfle.de \
    --cc=wei.liu2@citrix.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.