Re: [PATCH] mask ADT: new mask.h file [2/22]

Paul Jackson
2004-04-05T08:10:30Z

Rusty wrote:
> Throw away mask.h, and make any needed enhancements to bitmap.h (eg.
> inlines which check for the case of len <= BITS_PER_LONG).

That seems like a good, easy and localized change. Ok,
I will see if how it looks after I try to code it.

> get rid of the
> asm-generic/cpumask_optimized_for_large_smp_with_sparse_array_and_small_stack.h

My mask patch does this.

> then finally look at how ugly it would be to change users to
> directly using the bitmap.h functions on cpumasks.

That boils down to a very straightforward question. Do we ask
them to write:

cpus_or(s.bits, d1.bits, d2.bits)

or:

bitmap_or(s.bits, d1.bits, d2.bits, NR_CPUS);

I prefer the first choice. It requires a thin cpumask.h header
to wrap the bitmap ops, and add the final NR_CPUS to each one.

I believe the 2nd choice introduces one more way to screw up,
by specifying the wrong bitsize. I've got enough such ways
already - don't need more.