diff options
| author | Christoph Lameter <[email protected]> | 2007-10-16 01:25:29 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2007-10-16 09:42:58 -0700 |
| commit | 7ea1530ab3fdfa85441061909cc8040e84776fd4 (patch) | |
| tree | f3af0f8ed40a6df90bdbb9396d6163d59798a821 /include/linux | |
| parent | 13808910713a98cc1159291e62cdfec92cc94d05 (diff) | |
Memoryless nodes: introduce mask of nodes with memory
It is necessary to know if nodes have memory since we have recently begun to
add support for memoryless nodes. For that purpose we introduce a two new
node states: N_HIGH_MEMORY and N_NORMAL_MEMORY.
A node has its bit in N_HIGH_MEMORY set if it has any memory regardless of the
type of mmemory. If a node has memory then it has at least one zone defined
in its pgdat structure that is located in the pgdat itself.
A node has its bit in N_NORMAL_MEMORY set if it has a lower zone than
ZONE_HIGHMEM. This means it is possible to allocate memory that is not
subject to kmap.
N_HIGH_MEMORY and N_NORMAL_MEMORY can then be used in various places to insure
that we do the right thing when we encounter a memoryless node.
[[email protected]: build fix]
[[email protected]: update N_HIGH_MEMORY node state for memory hotadd]
[[email protected]: Fix memory hotplug + sparsemem build]
Signed-off-by: Lee Schermerhorn <[email protected]>
Signed-off-by: Nishanth Aravamudan <[email protected]>
Signed-off-by: Christoph Lameter <[email protected]>
Acked-by: Bob Picco <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Cc: Mel Gorman <[email protected]>
Signed-off-by: Yasunori Goto <[email protected]>
Signed-off-by: Paul Mundt <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/nodemask.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index 583e6b843d2a..ccee962f3559 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h @@ -341,8 +341,14 @@ static inline void __nodes_remap(nodemask_t *dstp, const nodemask_t *srcp, * 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_POSSIBLE, /* The node could become online at some point */ + N_ONLINE, /* The node is online */ + N_NORMAL_MEMORY, /* The node has regular memory */ +#ifdef CONFIG_HIGHMEM + N_HIGH_MEMORY, /* The node has regular or high memory */ +#else + N_HIGH_MEMORY = N_NORMAL_MEMORY, +#endif NR_NODE_STATES }; |