zone cleanup: Preparatory cleanup 1. Generate the per zone texts for the vmstats per macro. 2. Reformat the array with zone names Signed-off-by: Christoph Lameter Index: linux-2.6.17-mm3/mm/vmstat.c =================================================================== --- linux-2.6.17-mm3.orig/mm/vmstat.c 2006-06-28 10:32:14.441818620 -0700 +++ linux-2.6.17-mm3/mm/vmstat.c 2006-06-28 12:50:30.110742333 -0700 @@ -394,6 +394,8 @@ struct seq_operations fragmentation_op = .show = frag_show, }; +#define MAKE_PER_ZONE_TEXTS(x) x "_dma", x "_dma32", x "_normal", x "_high" + static char *vmstat_text[] = { /* Zoned VM counters */ "nr_anon_pages", @@ -421,10 +423,7 @@ static char *vmstat_text[] = { "pswpin", "pswpout", - "pgalloc_dma", - "pgalloc_dma32", - "pgalloc_normal", - "pgalloc_high", + MAKE_PER_ZONE_TEXTS("pgalloc"), "pgfree", "pgactivate", @@ -433,25 +432,10 @@ static char *vmstat_text[] = { "pgfault", "pgmajfault", - "pgrefill_dma", - "pgrefill_dma32", - "pgrefill_normal", - "pgrefill_high", - - "pgsteal_dma", - "pgsteal_dma32", - "pgsteal_normal", - "pgsteal_high", - - "pgscan_kswapd_dma", - "pgscan_kswapd_dma32", - "pgscan_kswapd_normal", - "pgscan_kswapd_high", - - "pgscan_direct_dma", - "pgscan_direct_dma32", - "pgscan_direct_normal", - "pgscan_direct_high", + MAKE_PER_ZONE_TEXTS("pgrefill"), + MAKE_PER_ZONE_TEXTS("pgsteal"), + MAKE_PER_ZONE_TEXTS("pgscan_kswapd"), + MAKE_PER_ZONE_TEXTS("pgscan_direct"), "pginodesteal", "slabs_scanned", Index: linux-2.6.17-mm3/mm/page_alloc.c =================================================================== --- linux-2.6.17-mm3.orig/mm/page_alloc.c 2006-06-27 09:40:25.604975349 -0700 +++ linux-2.6.17-mm3/mm/page_alloc.c 2006-06-28 12:49:33.558572405 -0700 @@ -81,7 +81,13 @@ EXPORT_SYMBOL(totalram_pages); struct zone *zone_table[1 << ZONETABLE_SHIFT] __read_mostly; EXPORT_SYMBOL(zone_table); -static char *zone_names[MAX_NR_ZONES] = { "DMA", "DMA32", "Normal", "HighMem" }; +static char *zone_names[MAX_NR_ZONES] = { + "DMA", + "DMA32", + "Normal", + "HighMem" +}; + int min_free_kbytes = 1024; unsigned long __meminitdata nr_kernel_pages;