lkml.org 
[lkml]   [2015]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2 0/3] Improve bitmap_empty and bitmap_full
Date
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


\
 
 \ /
  Last update: 2015-11-19 10:21    [W:0.072 / U:1.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site