diff options
author | Christoph Lameter <clameter@sgi.com> | 2006-09-26 02:31:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-26 11:48:46 -0400 |
commit | e53ef38d05dd59ed281a35590e4a5b64d8ff4c52 (patch) | |
tree | 42e525df84454e89abd6cab8d7983a6a0188b6bb /mm | |
parent | fb0e7942bdcbbd2f90e61cb4cfa4fa892a873f8a (diff) |
[PATCH] reduce MAX_NR_ZONES: make ZONE_HIGHMEM optional
Make ZONE_HIGHMEM optional
- ifdef out code and definitions related to CONFIG_HIGHMEM
- __GFP_HIGHMEM falls back to normal allocations if there is no
ZONE_HIGHMEM
- GFP_ZONEMASK becomes 0x01 if there is no DMA32 and no HIGHMEM
zone.
[jdike@addtoit.com: build fix]
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Christoph Lameter <clameter@engr.sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page_alloc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 5b5cbb5e1816..6c7c2dd1b3ed 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -73,7 +73,9 @@ int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1] = { | |||
73 | #ifdef CONFIG_ZONE_DMA32 | 73 | #ifdef CONFIG_ZONE_DMA32 |
74 | 256, | 74 | 256, |
75 | #endif | 75 | #endif |
76 | #ifdef CONFIG_HIGHMEM | ||
76 | 32 | 77 | 32 |
78 | #endif | ||
77 | }; | 79 | }; |
78 | 80 | ||
79 | EXPORT_SYMBOL(totalram_pages); | 81 | EXPORT_SYMBOL(totalram_pages); |
@@ -91,7 +93,9 @@ static char *zone_names[MAX_NR_ZONES] = { | |||
91 | "DMA32", | 93 | "DMA32", |
92 | #endif | 94 | #endif |
93 | "Normal", | 95 | "Normal", |
96 | #ifdef CONFIG_HIGHMEM | ||
94 | "HighMem" | 97 | "HighMem" |
98 | #endif | ||
95 | }; | 99 | }; |
96 | 100 | ||
97 | int min_free_kbytes = 1024; | 101 | int min_free_kbytes = 1024; |
@@ -1375,8 +1379,10 @@ static int __meminit build_zonelists_node(pg_data_t *pgdat, | |||
1375 | static inline int highest_zone(int zone_bits) | 1379 | static inline int highest_zone(int zone_bits) |
1376 | { | 1380 | { |
1377 | int res = ZONE_NORMAL; | 1381 | int res = ZONE_NORMAL; |
1382 | #ifdef CONFIG_HIGHMEM | ||
1378 | if (zone_bits & (__force int)__GFP_HIGHMEM) | 1383 | if (zone_bits & (__force int)__GFP_HIGHMEM) |
1379 | res = ZONE_HIGHMEM; | 1384 | res = ZONE_HIGHMEM; |
1385 | #endif | ||
1380 | #ifdef CONFIG_ZONE_DMA32 | 1386 | #ifdef CONFIG_ZONE_DMA32 |
1381 | if (zone_bits & (__force int)__GFP_DMA32) | 1387 | if (zone_bits & (__force int)__GFP_DMA32) |
1382 | res = ZONE_DMA32; | 1388 | res = ZONE_DMA32; |