From: Sergei Trofimovich <slyfox@gentoo.org>
To: SF Markus Elfring <elfring@users.sourceforge.net>
Cc: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Fenghua Yu <fenghua.yu@intel.com>,
"H. J. Lu" <hjl.tools@gmail.com>, Tony Luck <tony.luck@intel.com>
Subject: Re: [PATCH v3] ia64: fix module loading for gcc-5.4+
Date: Mon, 10 Apr 2017 22:53:36 +0100 [thread overview]
Message-ID: <20170410225336.5856d652@sf> (raw)
In-Reply-To: <d8146490-2bc4-3884-a64e-1e5894a023e3@users.sourceforge.net>
[-- Attachment #1: Type: text/plain, Size: 728 bytes --]
On Mon, 10 Apr 2017 19:23:28 +0200
SF Markus Elfring <elfring@users.sourceforge.net> wrote:
> > - if (slot(insn) != 2) {
> > + if (slot(insn) != 1 && slot(insn) != 2) {
>
> + int const s = slot(insn);
> + if (s < 1 || s > 2) {
>
> Do run time characteristics matter for such a condition check here?
It's done once at kernel module load time. My guess would be
"not critical at all".
slot() is a pure arithmetic static inline function. You can compare
assembly output before and after your change.
You can measure the difference yourself using 'ski' emulator.
That's for example how I debugged and tested the patch:
http://trofi.github.io/posts/199-ia64-machine-emulation.html
--
Sergei
[-- Attachment #2: Цифровая подпись OpenPGP --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2017-04-10 21:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <to=<20170408081449.4872-1-slyfox@gentoo.org>
2017-04-08 19:53 ` [PATCH v3] ia64: fix module loading for gcc-5.4 Sergei Trofimovich
2017-04-09 8:27 ` SF Markus Elfring
2017-04-09 8:51 ` Sergei Trofimovich
2017-04-09 9:02 ` SF Markus Elfring
2017-04-09 10:38 ` Sergei Trofimovich
2017-04-10 17:23 ` [PATCH v3] ia64: fix module loading for gcc-5.4+ SF Markus Elfring
2017-04-10 21:53 ` Sergei Trofimovich [this message]
2017-04-29 18:14 ` [PATCH v3] ia64: fix module loading for gcc-5.4 Sergei Trofimovich
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=20170410225336.5856d652@sf \
--to=slyfox@gentoo.org \
--cc=akpm@linux-foundation.org \
--cc=elfring@users.sourceforge.net \
--cc=fenghua.yu@intel.com \
--cc=hjl.tools@gmail.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
/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