diff options
Diffstat (limited to 'mm/vmstat.c')
| -rw-r--r-- | mm/vmstat.c | 52 |
1 files changed, 27 insertions, 25 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c index c1b5f4106b38..a2b6a9f96e5c 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c | |||
| @@ -321,6 +321,9 @@ void refresh_cpu_vm_stats(int cpu) | |||
| 321 | for_each_zone(zone) { | 321 | for_each_zone(zone) { |
| 322 | struct per_cpu_pageset *pcp; | 322 | struct per_cpu_pageset *pcp; |
| 323 | 323 | ||
| 324 | if (!populated_zone(zone)) | ||
| 325 | continue; | ||
| 326 | |||
| 324 | pcp = zone_pcp(zone, cpu); | 327 | pcp = zone_pcp(zone, cpu); |
| 325 | 328 | ||
| 326 | for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++) | 329 | for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++) |
| @@ -368,7 +371,7 @@ void zone_statistics(struct zonelist *zonelist, struct zone *z) | |||
| 368 | __inc_zone_state(z, NUMA_MISS); | 371 | __inc_zone_state(z, NUMA_MISS); |
| 369 | __inc_zone_state(zonelist->zones[0], NUMA_FOREIGN); | 372 | __inc_zone_state(zonelist->zones[0], NUMA_FOREIGN); |
| 370 | } | 373 | } |
| 371 | if (z->zone_pgdat == NODE_DATA(numa_node_id())) | 374 | if (z->node == numa_node_id()) |
| 372 | __inc_zone_state(z, NUMA_LOCAL); | 375 | __inc_zone_state(z, NUMA_LOCAL); |
| 373 | else | 376 | else |
| 374 | __inc_zone_state(z, NUMA_OTHER); | 377 | __inc_zone_state(z, NUMA_OTHER); |
| @@ -435,17 +438,34 @@ struct seq_operations fragmentation_op = { | |||
| 435 | .show = frag_show, | 438 | .show = frag_show, |
| 436 | }; | 439 | }; |
| 437 | 440 | ||
| 441 | #ifdef CONFIG_ZONE_DMA32 | ||
| 442 | #define TEXT_FOR_DMA32(xx) xx "_dma32", | ||
| 443 | #else | ||
| 444 | #define TEXT_FOR_DMA32(xx) | ||
| 445 | #endif | ||
| 446 | |||
| 447 | #ifdef CONFIG_HIGHMEM | ||
| 448 | #define TEXT_FOR_HIGHMEM(xx) xx "_high", | ||
| 449 | #else | ||
| 450 | #define TEXT_FOR_HIGHMEM(xx) | ||
| 451 | #endif | ||
| 452 | |||
| 453 | #define TEXTS_FOR_ZONES(xx) xx "_dma", TEXT_FOR_DMA32(xx) xx "_normal", \ | ||
| 454 | TEXT_FOR_HIGHMEM(xx) | ||
| 455 | |||
| 438 | static char *vmstat_text[] = { | 456 | static char *vmstat_text[] = { |
| 439 | /* Zoned VM counters */ | 457 | /* Zoned VM counters */ |
| 440 | "nr_anon_pages", | 458 | "nr_anon_pages", |
| 441 | "nr_mapped", | 459 | "nr_mapped", |
| 442 | "nr_file_pages", | 460 | "nr_file_pages", |
| 443 | "nr_slab", | 461 | "nr_slab_reclaimable", |
| 462 | "nr_slab_unreclaimable", | ||
| 444 | "nr_page_table_pages", | 463 | "nr_page_table_pages", |
| 445 | "nr_dirty", | 464 | "nr_dirty", |
| 446 | "nr_writeback", | 465 | "nr_writeback", |
| 447 | "nr_unstable", | 466 | "nr_unstable", |
| 448 | "nr_bounce", | 467 | "nr_bounce", |
| 468 | "nr_vmscan_write", | ||
| 449 | 469 | ||
| 450 | #ifdef CONFIG_NUMA | 470 | #ifdef CONFIG_NUMA |
| 451 | "numa_hit", | 471 | "numa_hit", |
| @@ -462,10 +482,7 @@ static char *vmstat_text[] = { | |||
| 462 | "pswpin", | 482 | "pswpin", |
| 463 | "pswpout", | 483 | "pswpout", |
| 464 | 484 | ||
| 465 | "pgalloc_dma", | 485 | TEXTS_FOR_ZONES("pgalloc") |
| 466 | "pgalloc_dma32", | ||
| 467 | "pgalloc_normal", | ||
| 468 | "pgalloc_high", | ||
| 469 | 486 | ||
| 470 | "pgfree", | 487 | "pgfree", |
| 471 | "pgactivate", | 488 | "pgactivate", |
| @@ -474,25 +491,10 @@ static char *vmstat_text[] = { | |||
| 474 | "pgfault", | 491 | "pgfault", |
| 475 | "pgmajfault", | 492 | "pgmajfault", |
| 476 | 493 | ||
| 477 | "pgrefill_dma", | 494 | TEXTS_FOR_ZONES("pgrefill") |
| 478 | "pgrefill_dma32", | 495 | TEXTS_FOR_ZONES("pgsteal") |
| 479 | "pgrefill_normal", | 496 | TEXTS_FOR_ZONES("pgscan_kswapd") |
| 480 | "pgrefill_high", | 497 | 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 | 498 | ||
| 497 | "pginodesteal", | 499 | "pginodesteal", |
| 498 | "slabs_scanned", | 500 | "slabs_scanned", |
