From: "George Spelvin" <linux@horizon.com>
To: linux@rasmusvillemoes.dk, yury.norov@gmail.com
Cc: akpm@linux-foundation.org, chris@chris-wilson.co.uk,
davem@davemloft.net, dborkman@redhat.com,
hannes@stressinduktion.org, klimov.linux@gmail.com,
laijs@cn.fujitsu.com, linux-kernel@vger.kernel.org,
linux@horizon.com, msalter@redhat.com,
takahiro.akashi@linaro.org, tgraf@suug.ch,
valentinrothberg@gmail.com, y.norov@samsung.com
Subject: Re: [PATCH v2 1/3] lib: find_*_bit reimplementation
Date: 2 Feb 2015 06:47:59 -0500 [thread overview]
Message-ID: <20150202114759.25525.qmail@ns.horizon.com> (raw)
In-Reply-To: <878uggr3tm.fsf@rasmusvillemoes.dk>
Rasmus Villemoes <linux@rasmusvillemoes.dk> wrote:
> ... and this be part of _find_next_bit? Can find_next_bit not be simply
> 'return _find_next_bit(addr, size, offset, 1);', and similarly for
> find_next_zero_bit? Btw., passing true and false for the boolean
> parameter may be a little clearer.
Looking at the generated code, it would be better to replace the boolean
parameter with 0ul or ~0ul and XOR with it. The same number of registers,
and saves a conditional branch.
(I was hoping GCC would figure that trick out, but it didn't.)
next prev parent reply other threads:[~2015-02-02 11:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-31 20:58 yury.norov
2015-01-31 20:58 ` [PATCH v2 2/3] lib: move find_last_bit to lib/find_next_bit.c yury.norov
2015-01-31 20:58 ` [PATCH v2 3/3] lib: rename lib/find_next_bit.c to lib/find_bit.c yury.norov
2015-02-02 11:09 ` Rasmus Villemoes
2015-02-02 3:17 ` [PATCH v2 1/3] lib: find_*_bit reimplementation George Spelvin
2015-02-04 23:07 ` Yury
2015-02-02 10:43 ` Rasmus Villemoes
2015-02-02 11:47 ` George Spelvin [this message]
2015-02-02 12:56 ` Rasmus Villemoes
2015-02-04 23:45 ` Yury
2015-02-05 14:51 ` Rasmus Villemoes
2015-02-04 22:52 ` Yury
2015-02-05 15:01 ` Rasmus Villemoes
2015-02-05 23:07 Alexey Klimov
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=20150202114759.25525.qmail@ns.horizon.com \
--to=linux@horizon.com \
--cc=akpm@linux-foundation.org \
--cc=chris@chris-wilson.co.uk \
--cc=davem@davemloft.net \
--cc=dborkman@redhat.com \
--cc=hannes@stressinduktion.org \
--cc=klimov.linux@gmail.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=msalter@redhat.com \
--cc=takahiro.akashi@linaro.org \
--cc=tgraf@suug.ch \
--cc=valentinrothberg@gmail.com \
--cc=y.norov@samsung.com \
--cc=yury.norov@gmail.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
Powered by JetHome