Re: [Patch 17/23] mask v2 = [6/7] nodemask_t_ia64_changes

Paul Jackson
2004-04-07T07:47:15Z

Several architectures have this large version of find_next_bit() code.

It may well make sense for the O(1) scheduler to be inlining this.

Perhaps these large versions should be renamed sched_find_next_bit(), as
is done for sched_find_first_bit(), and another, more space efficient
version provided under the name find_next_bit(), for use by others who
should prefer smaller code size. The asm-generic version of this
smaller one might be something like [pseudo C]:

int find_next_bit(addr, size, pos)
{
int i;
for (i = pos; i < size; i++) {
if (test_bit(i, addr))
break;
}
return i;
}

Arch's that have a reasonably tight version of find_next_bit() already
could use it for both sched_find_next_bit() and find_next_bit().

Just speculating ...