diff options
author | Christoph Lameter <clameter@sgi.com> | 2006-09-26 02:31:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-26 11:48:47 -0400 |
commit | 27bf71c2a7e596ed34e9bf2d4a5030321a09a1ad (patch) | |
tree | 30aca46595486b7a9d69d2d2f58b305cf32f41d9 /mm | |
parent | e53ef38d05dd59ed281a35590e4a5b64d8ff4c52 (diff) |
[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: Christoph Lameter <clameter@sgi.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.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/vmstat.c | 43 |
1 files changed, 20 insertions, 23 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c index c1b5f4106b38..04a9093f649e 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c | |||
@@ -435,6 +435,21 @@ struct seq_operations fragmentation_op = { | |||
435 | .show = frag_show, | 435 | .show = frag_show, |
436 | }; | 436 | }; |
437 | 437 | ||
438 | #ifdef CONFIG_ZONE_DMA32 | ||
439 | #define TEXT_FOR_DMA32(xx) xx "_dma32", | ||
440 | #else | ||
441 | #define TEXT_FOR_DMA32(xx) | ||
442 | #endif | ||
443 | |||
444 | #ifdef CONFIG_HIGHMEM | ||
445 | #define TEXT_FOR_HIGHMEM(xx) xx "_high", | ||
446 | #else | ||
447 | #define TEXT_FOR_HIGHMEM(xx) | ||
448 | #endif | ||
449 | |||
450 | #define TEXTS_FOR_ZONES(xx) xx "_dma", TEXT_FOR_DMA32(xx) xx "_normal", \ | ||
451 | TEXT_FOR_HIGHMEM(xx) | ||
452 | |||
438 | static char *vmstat_text[] = { | 453 | static char *vmstat_text[] = { |
439 | /* Zoned VM counters */ | 454 | /* Zoned VM counters */ |
440 | "nr_anon_pages", | 455 | "nr_anon_pages", |
@@ -462,10 +477,7 @@ static char *vmstat_text[] = { | |||
462 | "pswpin", | 477 | "pswpin", |
463 | "pswpout", | 478 | "pswpout", |
464 | 479 | ||
465 | "pgalloc_dma", | 480 | TEXTS_FOR_ZONES("pgalloc") |
466 | "pgalloc_dma32", | ||
467 | "pgalloc_normal", | ||
468 | "pgalloc_high", | ||
469 | 481 | ||
470 | "pgfree", | 482 | "pgfree", |
471 | "pgactivate", | 483 | "pgactivate", |
@@ -474,25 +486,10 @@ static char *vmstat_text[] = { | |||
474 | "pgfault", | 486 | "pgfault", |
475 | "pgmajfault", | 487 | "pgmajfault", |
476 | 488 | ||
477 | "pgrefill_dma", | 489 | TEXTS_FOR_ZONES("pgrefill") |
478 | "pgrefill_dma32", | 490 | TEXTS_FOR_ZONES("pgsteal") |
479 | "pgrefill_normal", | 491 | TEXTS_FOR_ZONES("pgscan_kswapd") |
480 | "pgrefill_high", | 492 | TEXTS_FOR_ZONES("pgscan_direct") |
481 | |||
482 | "pgsteal_dma", | ||
483 | "pgsteal_dma32", | ||
484 | "pgsteal_normal", | ||
485 | "pgsteal_high", | ||
486 | |||
487 | "pgscan_kswapd_dma", | ||
488 | "pgscan_kswapd_dma32", | ||
489 | "pgscan_kswapd_normal", | ||
490 | "pgscan_kswapd_high", | ||
491 | |||
492 | "pgscan_direct_dma", | ||
493 | "pgscan_direct_dma32", | ||
494 | "pgscan_direct_normal", | ||
495 | "pgscan_direct_high", | ||
496 | 493 | ||
497 | "pginodesteal", | 494 | "pginodesteal", |
498 | "slabs_scanned", | 495 | "slabs_scanned", |