diff options
author | Andy Whitcroft <apw@shadowen.org> | 2006-06-23 05:03:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-23 10:42:51 -0400 |
commit | 30c253e6da655d73eb8bfe2adca9b8f4d82fb81e (patch) | |
tree | 97c49ad364855b95ce52d97a62d176a077ff2a85 /include/linux/mmzone.h | |
parent | ddc2e812d592457747c4367fb73edcaa8e1e49ff (diff) |
[PATCH] sparsemem: record nid during memory present
Record the node id as we mark sections for instantiation. Use this nid
during instantiation to direct allocations.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Cc: Mike Kravetz <kravetz@us.ibm.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Bob Picco <bob.picco@hp.com>
Cc: Jack Steiner <steiner@sgi.com>
Cc: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Martin Bligh <mbligh@google.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/mmzone.h')
-rw-r--r-- | include/linux/mmzone.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index e82fc1a52cd0..d6120fa69116 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -509,6 +509,10 @@ struct mem_section { | |||
509 | * pages. However, it is stored with some other magic. | 509 | * pages. However, it is stored with some other magic. |
510 | * (see sparse.c::sparse_init_one_section()) | 510 | * (see sparse.c::sparse_init_one_section()) |
511 | * | 511 | * |
512 | * Additionally during early boot we encode node id of | ||
513 | * the location of the section here to guide allocation. | ||
514 | * (see sparse.c::memory_present()) | ||
515 | * | ||
512 | * Making it a UL at least makes someone do a cast | 516 | * Making it a UL at least makes someone do a cast |
513 | * before using it wrong. | 517 | * before using it wrong. |
514 | */ | 518 | */ |
@@ -548,6 +552,7 @@ extern int __section_nr(struct mem_section* ms); | |||
548 | #define SECTION_HAS_MEM_MAP (1UL<<1) | 552 | #define SECTION_HAS_MEM_MAP (1UL<<1) |
549 | #define SECTION_MAP_LAST_BIT (1UL<<2) | 553 | #define SECTION_MAP_LAST_BIT (1UL<<2) |
550 | #define SECTION_MAP_MASK (~(SECTION_MAP_LAST_BIT-1)) | 554 | #define SECTION_MAP_MASK (~(SECTION_MAP_LAST_BIT-1)) |
555 | #define SECTION_NID_SHIFT 2 | ||
551 | 556 | ||
552 | static inline struct page *__section_mem_map_addr(struct mem_section *section) | 557 | static inline struct page *__section_mem_map_addr(struct mem_section *section) |
553 | { | 558 | { |