Messages in this thread | | | Subject | [PATCH] Introduce nodemask_t ADT [0/7] | From | Matthew Dobson <> | Date | Thu, 18 Mar 2004 15:04:24 -0800 |
| |
I've got a fairly good size patch set to implement an ADT (Abstract Data Type) for nodemasks, which follows the path blazed by wli with the cpumask_t code. The basic idea is to create a generic, platform/arch-agnostic nodemask data type, complete with operations to do most anything you'd want to do with a nodemask. This stops us from open-coding nodemask operations, allows non-consecutive node numbering (ie: nodes don't have to be numbered 0...numnodes-1), gets rid of numnodes entirely (replaced with num_online_nodes()), and will facilitate the hotplugging of whole nodes.
As I mentioned, the code is heavily based on Bill Irwin's cpumask_t code. The changes are broken into seven patches:
nodemask_t-01-definitions.patch The basic definitions of the nodemask_t type: include/linux/nodemask.h, include/asm-generic/{nodemask.h, nodemask_arith.h, nodemask_array.h, nodemask_const_reference.h, nodemask_const_value.h, nodemask_nonuma.h}, and some small changes to include/linux/mmzone.h (removing extistant definition of node_online_map and helper functions).
nodemask_t-02-core.patch Changes to arch-independent code. Surprisingly few references to numnodes, open-coded node loops, etc. Most important result of this patch is that no generic code assumes anything about node numbering. This allows individual arches to use sparse numbering if they care to.
nodemask_t-03-i386.patch Changes to i386 specific code. As with most arch changes, it involves close-coding loops (ie: for_each_online_node(nid) rather than for(nid=0;nid<numnodes;nid++)) and replacing the use of numnodes with num_online_nodes() and node_set_online(nid).
nodemask_t-04-ppc64.patch Changes to ppc64 specific code. Untested. Code review & testing requested.
nodemask_t-05-x86_64.patch Changes to x86_64 specific code. Untested. Code review & testing requested.
nodemask_t-06-ia64.patch Changes to ia64 specific code. Untested. Code review & testing requested.
nodemask_t-07-other.patch Changes to other arch-specific code (alpha, arm, mips, sparc64 & sh). Untested. Code review & testing requested.
- 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/
| |