Your nodemask_t reminds me of something I posted to linux-ia64 last November 7, 2004, under the subject: "[PATCH preview] Adds nodemask_t for use in cpusets (NUMA memory placement)". Chris Hellwig responded to it at the time asking why I didn't provide a single generic mask ADT, and make cpumask and nodemask instances of that. I coded that up, but then got distracted. The remaining issue for which I didn't have a good answer was that my proposal would break the optimum handling for sparc64 or other systems that didn't handle passing structures on the stack efficiently. Bill Irwin was a party to my discussions of that effort, so I presume that if he felt it had further merit, he would have mentioned it to you, Matthew. Could one of you, Bill or Matthew, speak to why this generic mask ADT, underlying both cpumask and nodemask, should not be pursued further, instead of duplicating the various details of cpumask, after a global s/cpu/node/g change? I am attaching the header file include/linux/mask.h for my current version of this mask.h, in case someone reading wants more specifics of what it is that I am referring to. This version almost certainly does _not_ work on big endian 64 systems, due to my ignorance of how kernel bitmasks were layed out when I last worked on this mask.h header. Unlike the sparc64 performance issues with passing structs on the stack, I would hope that the big/little endian issues could be fixed without messing things up too much. If this mask.h could actually be made to work, including on sparc64, then it would seem to be a much cleaner solution. With it, we would define cpumask_t and nodemask_t as simply: typedef __mask(NR_NODES) nodemask_t; typedef __mask(NR_CPUS) cpumask_t; and either use operations such as mask_and() on both, or if one insisted on keeping operations that specifically called out cpumask, add some 15 trivial defines such as: #define cpumask_and(dst, src1, src2) mask_and(dst, src1, src2) -- I won't rest till it's the best ... Programmer, Linux Scalability Paul Jackson 1.650.933.1373