lkml.org 
[lkml]   [2010]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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?


\
 
 \ /
  Last update: 2010-11-15 07:45    [W:0.036 / U:1.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site