From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Jia He <hejianet@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Denys Vlasenko <dvlasenk@redhat.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Michal Nazarewicz <mina86@mina86.com>,
Yury Norov <yury.norov@gmail.com>, Tejun Heo <tj@kernel.org>,
Martin Kepplinger <martink@posteo.de>,
George Spelvin <linux@horizon.com>,
Ingo Molnar <mingo@kernel.org>, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH v2 0/3] Improve bitmap_empty and bitmap_full
Date: Thu, 19 Nov 2015 10:01:17 +0100 [thread overview]
Message-ID: <87bnaqtlb6.fsf@rasmusvillemoes.dk> (raw)
In-Reply-To: <1447915724-29709-1-git-send-email-hejianet@gmail.com> (Jia He's message of "Thu, 19 Nov 2015 14:48:41 +0800")
On Thu, Nov 19 2015, Jia He <hejianet@gmail.com> wrote:
> find_fisrt_{zero_}bit are too heavy for bitmap_{full,empty}. We don't
> need to calculate and compare the position of bitmap. This set of patch
> instroduces lightweight api and replaces the heavy one.
>
Please check the history of the code you're modifying. git blame
include/linux/bitmap.h would immediately point you to 2afe27c718b
"lib/bitmap.c: bitmap_[empty,full]: remove code duplication". While it's
obviously true that find_first_bit does slightly more work than strictly
necessary to establish whether the bitmap is empty, it does the same
number of memory accesses, so I wouldn't consider it particularly
heavy-weight. Getting rid of .text as 2afe27c718b did is a good thing,
so you'd have to explain why we should reintroduce specialized functions
for this.
Your code is also buggy :-(
Rasmus
prev parent reply other threads:[~2015-11-19 9:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-19 6:48 [PATCH v2 0/3] Improve bitmap_empty and bitmap_full Jia He
2015-11-19 6:48 ` [PATCH v2 1/3] linux/bitmap: Move 2 mask macro from bitmap.h to bitops.h Jia He
2015-11-19 6:48 ` [PATCH v2 2/3] lib: Introduce 2 bit ops api: all_is_bit_{one,zero} Jia He
2015-11-19 8:40 ` xinhui
2015-11-19 8:55 ` hejianet
2015-11-19 8:49 ` yalin wang
2015-11-19 6:48 ` [PATCH v3 3/3] linux/bitmap: Replace find_fisrt_{zero_}bit with the new lightweight api Jia He
2015-11-19 9:01 ` Rasmus Villemoes [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=87bnaqtlb6.fsf@rasmusvillemoes.dk \
--to=linux@rasmusvillemoes.dk \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=dvlasenk@redhat.com \
--cc=hejianet@gmail.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@horizon.com \
--cc=martink@posteo.de \
--cc=mina86@mina86.com \
--cc=mingo@kernel.org \
--cc=tj@kernel.org \
--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