[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87bnaqtlb6.fsf@rasmusvillemoes.dk>
Date: Thu, 19 Nov 2015 10:01:17 +0100
From: Rasmus Villemoes <linux@...musvillemoes.dk>
To: Jia He <hejianet@...il.com>
Cc: linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Denys Vlasenko <dvlasenk@...hat.com>,
Kyungmin Park <kyungmin.park@...sung.com>,
Michal Nazarewicz <mina86@...a86.com>,
Yury Norov <yury.norov@...il.com>, Tejun Heo <tj@...nel.org>,
Martin Kepplinger <martink@...teo.de>,
George Spelvin <linux@...izon.com>,
Ingo Molnar <mingo@...nel.org>, Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH v2 0/3] Improve bitmap_empty and bitmap_full
On Thu, Nov 19 2015, Jia He <hejianet@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists