xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
	"Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [Xen-devel] [PATCH] x86/boot: Simplify %fs setup in trampoline_setup
Date: Tue, 27 Aug 2019 16:24:30 +0200	[thread overview]
Message-ID: <13ea9a6d-733c-42ce-4bd1-e73cc7b2cba1@suse.com> (raw)
In-Reply-To: <20190812151032.9353-1-andrew.cooper3@citrix.com>

On 12.08.2019 17:10, Andrew Cooper wrote:
> mov/shr is easier to follow than shld, and doesn't have a merge dependency on
> the previous value of %edx.  Shorten the rest of the code by streamlining the
> comments.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> CC: Jan Beulich <JBeulich@suse.com>
> CC: Wei Liu <wl@xen.org>
> CC: Roger Pau Monné <roger.pau@citrix.com>
> 
> In addition to being clearer to follow, mov/shr is faster than shld to decode
> and execute.  See https://godbolt.org/z/A5kvuC for the latency/throughput/port
> analysis, the Intel Optimisation guide which classifes them as "Slow Int"
> instructions, or the AMD Optimisation guide which specifically has a section
> entitled "Alternatives to SHLD Instruction".

I don't really mind the change, but I don't think performance is a
concern here. Instead I think we want to size-optimize the trampoline
as much as possible, which is why (iirc) I had asked for the use of
SHLD here. Considering David's work to split boot and permanent
trampoline I'm find with the minimal 1 byte increase though:

Reviewed-by: Jan Beulich <jbeulich@suse.com>

Jan

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

      parent reply	other threads:[~2019-08-27 14:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-12 15:10 [Xen-devel] [PATCH] x86/boot: Simplify %fs setup in trampoline_setup Andrew Cooper
2019-08-13 11:05 ` Wei Liu
2019-08-27 14:24 ` Jan Beulich [this message]

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=13ea9a6d-733c-42ce-4bd1-e73cc7b2cba1@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@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).