Messages in this thread | | | Subject | Re: [PATCH] x86: Change x86 to use generic find_next_bit | From | Andi Kleen <> | Date | 09 Mar 2008 21:28:32 +0100 |
| |
Alexander van Heukelum <heukelum@mailshack.com> writes: > > If the bitmap size is not a multiple of BITS_PER_LONG, and no set > (cleared) bit is found, find_next_bit (find_next_zero_bit) returns a > value outside of the range [0,size]. The generic version always returns > exactly size.
With that change it is likely possible to remove the min(NR_CPUS in lib/cpumask.c __first/__next_cpu. iirc it was just a workaround for the x86 quirk. I suspect with such a change it would be possible to inline those again, possibly speeding up some loops who do cpumask walking (iirc the scheduler used to do that frequently)
-Andi
| |