Subject: NUMA: Memoryless node support V3 To: akpm@linux-foundation.org Cc: kxr@sgi.com Cc: linux-mm@kvack.org Cc: Nishanth Aravamudan Cc: Lee Schermerhorn Cc: KAMEZAWA Hiroyuki Changes V2->V3: - Refresh patches (sigh) - Add comments suggested by Kamezawa Hiroyuki - Add signoff by Jes Sorensen Changes V1->V2: - Add a generic layer that allows the definition of additional node bitmaps This patchset is implementing additional node bitmaps that allow the system to track nodes that are online without memory and nodes that have processors. In various subsystems we can use that information to customize VM behavior. We define a number of node states that we track in enum node_states /* * Bitmasks that are kept for all the nodes. */ enum node_states { N_POSSIBLE, /* The node could become online at some point */ N_ONLINE, /* The node is online */ N_MEMORY, /* The node has memory */ N_CPU, /* The node has cpus */ NR_NODE_STATES }; and define operations using the node states: static inline int node_state(int node, enum node_states state) { return node_isset(node, node_states[state]); } static inline void node_set_state(int node, enum node_states state) { __node_set(node, &node_states[state]); } static inline void node_clear_state(int node, enum node_states state) { __node_clear(node, &node_states[state]); } static inline int num_node_state(enum node_states state) { return nodes_weight(node_states[state]); }