aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2007-02-10 04:43:10 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 13:51:18 -0500
commit4b51d66989218aad731a721b5b28c79bf5388c09 (patch)
tree8ff7acbd219f699c20c2f1fd201ffb3db5a64062 /mm/page_alloc.c
parent66701b1499a3ff11882c8c4aef36e8eac86e17b1 (diff)
[PATCH] optional ZONE_DMA: optional ZONE_DMA in the VM
Make ZONE_DMA optional in core code. - ifdef all code for ZONE_DMA and related definitions following the example for ZONE_DMA32 and ZONE_HIGHMEM. - Without ZONE_DMA, ZONE_HIGHMEM and ZONE_DMA32 we get to a ZONES_SHIFT of 0. - Modify the VM statistics to work correctly without a DMA zone. - Modify slab to not create DMA slabs if there is no ZONE_DMA. [akpm@osdl.org: cleanup] [jdike@addtoit.com: build fix] [apw@shadowen.org: Simplify calculation of the number of bits we need for ZONES_SHIFT] Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Andi Kleen <ak@suse.de> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Matthew Wilcox <willy@debian.org> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 6cff13840c6d..d461b23a27a1 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -73,7 +73,9 @@ static void __free_pages_ok(struct page *page, unsigned int order);
73 * don't need any ZONE_NORMAL reservation 73 * don't need any ZONE_NORMAL reservation
74 */ 74 */
75int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1] = { 75int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1] = {
76#ifdef CONFIG_ZONE_DMA
76 256, 77 256,
78#endif
77#ifdef CONFIG_ZONE_DMA32 79#ifdef CONFIG_ZONE_DMA32
78 256, 80 256,
79#endif 81#endif
@@ -85,7 +87,9 @@ int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1] = {
85EXPORT_SYMBOL(totalram_pages); 87EXPORT_SYMBOL(totalram_pages);
86 88
87static char * const zone_names[MAX_NR_ZONES] = { 89static char * const zone_names[MAX_NR_ZONES] = {
90#ifdef CONFIG_ZONE_DMA
88 "DMA", 91 "DMA",
92#endif
89#ifdef CONFIG_ZONE_DMA32 93#ifdef CONFIG_ZONE_DMA32
90 "DMA32", 94 "DMA32",
91#endif 95#endif