Come to think of it, using any of the bitops generates unoptimized code
for cpu mask testing when we know that NR_CPUS will fit into a single
long. For NR_CPUS <= 8*sizeof(long), using mask & (1UL << cpu) removes
the unnecessary array calculations.
>What's the state of 2.5.x on the big machines where you're at?
I could tell you, but then marketing would kill me :( Wait a bit.
>Another thought I had was wrapping things in structures for both small
>and large, even UP systems so proper typechecking is enforced at all
>times. That would probably need a great deal of arch sweeping to do,
>especially as a number of arches are UP-only (non-SMP case's motive #2).
Keep the optimized model, where cpu_online_map is #defined to 1 for UP.
Changing it to an ADT just to get type checking on architectures that
only support UP looks like a bad tradeoff.
-
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/