diff options
-rw-r--r-- | arch/s390/appldata/appldata_mem.c | 3 | ||||
-rw-r--r-- | include/linux/vmstat.h | 14 | ||||
-rw-r--r-- | mm/vmstat.c | 43 |
3 files changed, 34 insertions, 26 deletions
diff --git a/arch/s390/appldata/appldata_mem.c b/arch/s390/appldata/appldata_mem.c index ab3b0765a64e..8aea3698a77b 100644 --- a/arch/s390/appldata/appldata_mem.c +++ b/arch/s390/appldata/appldata_mem.c | |||
@@ -117,8 +117,7 @@ static void appldata_get_mem_data(void *data) | |||
117 | mem_data->pgpgout = ev[PGPGOUT] >> 1; | 117 | mem_data->pgpgout = ev[PGPGOUT] >> 1; |
118 | mem_data->pswpin = ev[PSWPIN]; | 118 | mem_data->pswpin = ev[PSWPIN]; |
119 | mem_data->pswpout = ev[PSWPOUT]; | 119 | mem_data->pswpout = ev[PSWPOUT]; |
120 | mem_data->pgalloc = ev[PGALLOC_HIGH] + ev[PGALLOC_NORMAL] + | 120 | mem_data->pgalloc = ev[PGALLOC_NORMAL] + ev[PGALLOC_DMA]; |
121 | ev[PGALLOC_DMA]; | ||
122 | mem_data->pgfault = ev[PGFAULT]; | 121 | mem_data->pgfault = ev[PGFAULT]; |
123 | mem_data->pgmajfault = ev[PGMAJFAULT]; | 122 | mem_data->pgmajfault = ev[PGMAJFAULT]; |
124 | 123 | ||
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 9c6e62c56ec2..176c7f797339 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
@@ -18,7 +18,19 @@ | |||
18 | * generated will simply be the increment of a global address. | 18 | * generated will simply be the increment of a global address. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #define FOR_ALL_ZONES(x) x##_DMA, x##_DMA32, x##_NORMAL, x##_HIGH | 21 | #ifdef CONFIG_ZONE_DMA32 |
22 | #define DMA32_ZONE(xx) xx##_DMA32, | ||
23 | #else | ||
24 | #define DMA32_ZONE(xx) | ||
25 | #endif | ||
26 | |||
27 | #ifdef CONFIG_HIGHMEM | ||
28 | #define HIGHMEM_ZONE(xx) , xx##_HIGH | ||
29 | #else | ||
30 | #define HIGHMEM_ZONE(xx) | ||
31 | #endif | ||
32 | |||
33 | #define FOR_ALL_ZONES(xx) xx##_DMA, DMA32_ZONE(xx) xx##_NORMAL HIGHMEM_ZONE(xx) | ||
22 | 34 | ||
23 | enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, | 35 | enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, |
24 | FOR_ALL_ZONES(PGALLOC), | 36 | FOR_ALL_ZONES(PGALLOC), |
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", |