All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Keir Fraser <keir@xen.org>, Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] x86: Adjust rdtsc inline assembly
Date: Wed, 18 Feb 2015 13:59:08 +0000	[thread overview]
Message-ID: <54E49AAC.7010407@citrix.com> (raw)
In-Reply-To: <54E49D99020000780006114E@mail.emea.novell.com>

On 18/02/15 13:11, Jan Beulich wrote:
>>>> On 18.02.15 at 13:25, <andrew.cooper3@citrix.com> wrote:
>> The single use of the old rdtsc() in emulate_privileged_op() is altered to use
>> the new rdtsc() and the rdmsr_writeback path to set eax/edx appropriately.
> I'm not entirely sure about this one - the current code surely is slightly
> faster than the replacement. Question is how much this matters. I'd
> suggest to be on the safe side and simply open-code the asm() there.

It is a matter of a 4 instructions on a fault slowpath, which which only
ever executed in the unlikely case that vtsc is enabled on a domain, or
the kernel has set CR4.TSD.

I would not loose sleep over the introduced inefficiently.

~Andrew

  reply	other threads:[~2015-02-18 13:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-18 12:25 [PATCH] x86: Adjust rdtsc inline assembly Andrew Cooper
2015-02-18 13:11 ` Jan Beulich
2015-02-18 13:59   ` Andrew Cooper [this message]
2015-02-18 14:05     ` [PATCH v2] " 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=54E49AAC.7010407@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --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.