Re: [PATCH] x86: Change x86 to use generic find_next_bit

From: Andi Kleen
Date: Sun Mar 09 2008 - 16:28:43 EST


Alexander van Heukelum <heukelum@xxxxxxxxxxxxx> 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/