Messages in this thread | | | Date | Mon, 5 Apr 2004 01:08:39 -0700 | From | Paul Jackson <> | Subject | Re: [PATCH] mask ADT: new mask.h file [2/22] |
| |
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.
-- I won't rest till it's the best ... Programmer, Linux Scalability Paul Jackson <pj@sgi.com> 1.650.933.1373 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |