Messages in this thread | | | Date | Mon, 15 Nov 2010 15:41:59 +0900 | From | Paul Mundt <> | Subject | Re: [v2,2/8] NUMA Hotplug emulator |
| |
On Sat, Nov 13, 2010 at 02:14:45PM +0800, Shaohui Zheng wrote: > diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h > index dba35e4..ba0f82d 100644 > --- a/include/linux/nodemask.h > +++ b/include/linux/nodemask.h > @@ -371,6 +371,10 @@ static inline void __nodes_fold(nodemask_t *dstp, const nodemask_t *origp, > */ > enum node_states { > N_POSSIBLE, /* The node could become online at some point */ > +#ifdef CONFIG_NODE_HOTPLUG_EMU > + N_HIDDEN, /* The node is hidden at booting time, could be > + * onlined in run time */ > +#endif > N_ONLINE, /* The node is online */ > N_NORMAL_MEMORY, /* The node has regular memory */ > #ifdef CONFIG_HIGHMEM > @@ -470,6 +474,13 @@ static inline int num_node_state(enum node_states state) > #define node_online(node) node_state((node), N_ONLINE) > #define node_possible(node) node_state((node), N_POSSIBLE) > > +#ifdef CONFIG_NODE_HOTPLUG_EMU > +#define node_set_hidden(node) node_set_state((node), N_HIDDEN) > +#define node_clear_hidden(node) node_clear_state((node), N_HIDDEN) > +#define node_hidden(node) node_state((node), N_HIDDEN) > +extern int hotadd_hidden_nodes(int nid); > +#endif > + > #define for_each_node(node) for_each_node_state(node, N_POSSIBLE) > #define for_each_online_node(node) for_each_node_state(node, N_ONLINE) > None of these really need to be under ifdef. Secondly, the description you have provided is pretty ambiguous in comparison to N_POSSIBLE. Is there some reason you can't just use N_POSSIBLE for this instead?
| |