From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: xen-devel@lists.xenproject.org,
Andrew Cooper <andrew.cooper3@citrix.com>, Wei Liu <wl@xen.org>,
Frediano Ziglio <frediano.ziglio@cloud.com>
Subject: Re: [PATCH v2] Reduce assembly code size of exception entry points
Date: Wed, 14 Feb 2024 16:29:02 +0100 [thread overview]
Message-ID: <ZczcPhpcWuAO7OYh@macbook> (raw)
In-Reply-To: <ce3ae020-92b2-44fd-8055-694e374f68a9@suse.com>
On Wed, Feb 14, 2024 at 04:08:12PM +0100, Jan Beulich wrote:
> On 14.02.2024 16:02, Roger Pau Monné wrote:
> > On Wed, Feb 14, 2024 at 10:35:58AM +0000, Frediano Ziglio wrote:
> >> We just pushed a 8-bytes zero and exception constants are
> >> small so we can just write a single byte saving 3 bytes for
> >> instruction.
> >> With ENDBR64 this reduces the size of many entry points from 32 to
> >> 16 bytes (due to alignment).
> >> Similar code is already used in autogen_stubs.
> >
> > Will using movb instead of movl have any performance impact? I don't
> > think we should trade speed for code size, so this needs to be
> > mentioned in the commit message.
>
> That's really what the last sentence is about (it could have been said
> more explicitly though): If doing so on interrupt paths is fine, it
> ought to be fine on exception paths as well.
I might view it the other way around: maybe it's autogen_stubs that
needs changing to use movl instead of movb for performance reasons?
I think this needs to be clearly stated, and ideally some kind of
benchmarks should be provided to demonstrate no performance change if
there are doubts whether movl and movb might perform differently.
Thanks, Roger.
next prev parent reply other threads:[~2024-02-14 15:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-14 10:35 [PATCH v2] Reduce assembly code size of exception entry points Frediano Ziglio
2024-02-14 13:56 ` Jan Beulich
2024-02-14 14:20 ` Jan Beulich
2024-02-14 15:02 ` Roger Pau Monné
2024-02-14 15:08 ` Jan Beulich
2024-02-14 15:29 ` Roger Pau Monné [this message]
2024-02-14 15:53 ` Andrew Cooper
2024-02-14 16:05 ` Roger Pau Monné
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=ZczcPhpcWuAO7OYh@macbook \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=frediano.ziglio@cloud.com \
--cc=jbeulich@suse.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 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.