diff options
author | Yinghai Lu <yinghai@kernel.org> | 2009-12-15 20:59:02 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-12-16 19:43:37 -0500 |
commit | 329962503692b42d8088f31584e42d52db179d52 (patch) | |
tree | fe8aa709fcbf6154e25c291ec569885a23e2eba1 /include/linux/mm.h | |
parent | 45a94d7cd45ed991914011919e7d40eb6d2546d1 (diff) |
x86: Fix checking of SRAT when node 0 ram is not from 0
Found one system that boot from socket1 instead of socket0, SRAT get rejected...
[ 0.000000] SRAT: Node 1 PXM 0 0-a0000
[ 0.000000] SRAT: Node 1 PXM 0 100000-80000000
[ 0.000000] SRAT: Node 1 PXM 0 100000000-2080000000
[ 0.000000] SRAT: Node 0 PXM 1 2080000000-4080000000
[ 0.000000] SRAT: Node 2 PXM 2 4080000000-6080000000
[ 0.000000] SRAT: Node 3 PXM 3 6080000000-8080000000
[ 0.000000] SRAT: Node 4 PXM 4 8080000000-a080000000
[ 0.000000] SRAT: Node 5 PXM 5 a080000000-c080000000
[ 0.000000] SRAT: Node 6 PXM 6 c080000000-e080000000
[ 0.000000] SRAT: Node 7 PXM 7 e080000000-10080000000
...
[ 0.000000] NUMA: Allocated memnodemap from 500000 - 701040
[ 0.000000] NUMA: Using 20 for the hash shift.
[ 0.000000] Adding active range (0, 0x2080000, 0x4080000) 0 entries of 3200 used
[ 0.000000] Adding active range (1, 0x0, 0x96) 1 entries of 3200 used
[ 0.000000] Adding active range (1, 0x100, 0x7f750) 2 entries of 3200 used
[ 0.000000] Adding active range (1, 0x100000, 0x2080000) 3 entries of 3200 used
[ 0.000000] Adding active range (2, 0x4080000, 0x6080000) 4 entries of 3200 used
[ 0.000000] Adding active range (3, 0x6080000, 0x8080000) 5 entries of 3200 used
[ 0.000000] Adding active range (4, 0x8080000, 0xa080000) 6 entries of 3200 used
[ 0.000000] Adding active range (5, 0xa080000, 0xc080000) 7 entries of 3200 used
[ 0.000000] Adding active range (6, 0xc080000, 0xe080000) 8 entries of 3200 used
[ 0.000000] Adding active range (7, 0xe080000, 0x10080000) 9 entries of 3200 used
[ 0.000000] SRAT: PXMs only cover 917504MB of your 1048566MB e820 RAM. Not used.
[ 0.000000] SRAT: SRAT not used.
the early_node_map is not sorted because node0 with non zero start come first.
so try to sort it right away after all regions are registered.
also fixs refression by 8716273c (x86: Export srat physical topology)
-v2: make it more solid to handle cross node case like node0 [0,4g), [8,12g) and node1 [4g, 8g), [12g, 16g)
-v3: update comments.
Reported-and-tested-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <4B2579D2.3010201@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 24c395694f4d..20a2036f3a94 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1022,6 +1022,9 @@ extern void add_active_range(unsigned int nid, unsigned long start_pfn, | |||
1022 | extern void remove_active_range(unsigned int nid, unsigned long start_pfn, | 1022 | extern void remove_active_range(unsigned int nid, unsigned long start_pfn, |
1023 | unsigned long end_pfn); | 1023 | unsigned long end_pfn); |
1024 | extern void remove_all_active_ranges(void); | 1024 | extern void remove_all_active_ranges(void); |
1025 | void sort_node_map(void); | ||
1026 | unsigned long __absent_pages_in_range(int nid, unsigned long start_pfn, | ||
1027 | unsigned long end_pfn); | ||
1025 | extern unsigned long absent_pages_in_range(unsigned long start_pfn, | 1028 | extern unsigned long absent_pages_in_range(unsigned long start_pfn, |
1026 | unsigned long end_pfn); | 1029 | unsigned long end_pfn); |
1027 | extern void get_pfn_range_for_nid(unsigned int nid, | 1030 | extern void get_pfn_range_for_nid(unsigned int nid, |