Re: [PATCH] bitmap: speedup in bitmap_find_free_region when order is 0

2013-04-08 Thread Joe Perches
On Mon, 2013-04-08 at 14:30 -0700, Andrew Morton wrote: > On Mon, 8 Apr 2013 11:23:48 +0900 Chanho Min wrote: > > --- a/lib/bitmap.c [] > > +static int __bitmap_find_free_one(unsigned long *bitmap, int bits) [] > > + unsigned long mask = (unsigned long)(~((unsigned long) 0)); > > That seems un

Re: [PATCH] bitmap: speedup in bitmap_find_free_region when order is 0

2013-04-08 Thread Andrew Morton
On Mon, 8 Apr 2013 11:23:48 +0900 Chanho Min wrote: > If bitmap_find_free_region() is called with order=0, We can reduce > for-loops to find 1 free bit. First, It scans bitmap array by the > increment of long type, then find 1 free bit within 1 long type value. That seems sensible. I assume-wi