Commit 27bf71c2 authored by Christoph Lameter's avatar Christoph Lameter Committed by Linus Torvalds

[PATCH] reduce MAX_NR_ZONES: remove display of counters for unconfigured zones

eventcounters: Do not display counters for zones that are not available on an
arch

Do not define or display counters for the DMA32 and the HIGHMEM zone if such
zones were not configured.

[akpm@osdl.org: s390 fix]
[heiko.carstens@de.ibm.com: s390 fix]
Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e53ef38d
...@@ -117,8 +117,7 @@ static void appldata_get_mem_data(void *data) ...@@ -117,8 +117,7 @@ static void appldata_get_mem_data(void *data)
mem_data->pgpgout = ev[PGPGOUT] >> 1; mem_data->pgpgout = ev[PGPGOUT] >> 1;
mem_data->pswpin = ev[PSWPIN]; mem_data->pswpin = ev[PSWPIN];
mem_data->pswpout = ev[PSWPOUT]; mem_data->pswpout = ev[PSWPOUT];
mem_data->pgalloc = ev[PGALLOC_HIGH] + ev[PGALLOC_NORMAL] + mem_data->pgalloc = ev[PGALLOC_NORMAL] + ev[PGALLOC_DMA];
ev[PGALLOC_DMA];
mem_data->pgfault = ev[PGFAULT]; mem_data->pgfault = ev[PGFAULT];
mem_data->pgmajfault = ev[PGMAJFAULT]; mem_data->pgmajfault = ev[PGMAJFAULT];
......
...@@ -18,7 +18,19 @@ ...@@ -18,7 +18,19 @@
* generated will simply be the increment of a global address. * generated will simply be the increment of a global address.
*/ */
#define FOR_ALL_ZONES(x) x##_DMA, x##_DMA32, x##_NORMAL, x##_HIGH #ifdef CONFIG_ZONE_DMA32
#define DMA32_ZONE(xx) xx##_DMA32,
#else
#define DMA32_ZONE(xx)
#endif
#ifdef CONFIG_HIGHMEM
#define HIGHMEM_ZONE(xx) , xx##_HIGH
#else
#define HIGHMEM_ZONE(xx)
#endif
#define FOR_ALL_ZONES(xx) xx##_DMA, DMA32_ZONE(xx) xx##_NORMAL HIGHMEM_ZONE(xx)
enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
FOR_ALL_ZONES(PGALLOC), FOR_ALL_ZONES(PGALLOC),
......
...@@ -435,6 +435,21 @@ struct seq_operations fragmentation_op = { ...@@ -435,6 +435,21 @@ struct seq_operations fragmentation_op = {
.show = frag_show, .show = frag_show,
}; };
#ifdef CONFIG_ZONE_DMA32
#define TEXT_FOR_DMA32(xx) xx "_dma32",
#else
#define TEXT_FOR_DMA32(xx)
#endif
#ifdef CONFIG_HIGHMEM
#define TEXT_FOR_HIGHMEM(xx) xx "_high",
#else
#define TEXT_FOR_HIGHMEM(xx)
#endif
#define TEXTS_FOR_ZONES(xx) xx "_dma", TEXT_FOR_DMA32(xx) xx "_normal", \
TEXT_FOR_HIGHMEM(xx)
static char *vmstat_text[] = { static char *vmstat_text[] = {
/* Zoned VM counters */ /* Zoned VM counters */
"nr_anon_pages", "nr_anon_pages",
...@@ -462,10 +477,7 @@ static char *vmstat_text[] = { ...@@ -462,10 +477,7 @@ static char *vmstat_text[] = {
"pswpin", "pswpin",
"pswpout", "pswpout",
"pgalloc_dma", TEXTS_FOR_ZONES("pgalloc")
"pgalloc_dma32",
"pgalloc_normal",
"pgalloc_high",
"pgfree", "pgfree",
"pgactivate", "pgactivate",
...@@ -474,25 +486,10 @@ static char *vmstat_text[] = { ...@@ -474,25 +486,10 @@ static char *vmstat_text[] = {
"pgfault", "pgfault",
"pgmajfault", "pgmajfault",
"pgrefill_dma", TEXTS_FOR_ZONES("pgrefill")
"pgrefill_dma32", TEXTS_FOR_ZONES("pgsteal")
"pgrefill_normal", TEXTS_FOR_ZONES("pgscan_kswapd")
"pgrefill_high", TEXTS_FOR_ZONES("pgscan_direct")
"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",
"pginodesteal", "pginodesteal",
"slabs_scanned", "slabs_scanned",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment