diff options
Diffstat (limited to 'mm/vmstat.c')
| -rw-r--r-- | mm/vmstat.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c index b0d08e667ece..d7826af2fb07 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c | |||
| @@ -516,9 +516,26 @@ static void pagetypeinfo_showblockcount_print(struct seq_file *m, | |||
| 516 | continue; | 516 | continue; |
| 517 | 517 | ||
| 518 | page = pfn_to_page(pfn); | 518 | page = pfn_to_page(pfn); |
| 519 | #ifdef CONFIG_ARCH_FLATMEM_HAS_HOLES | ||
| 520 | /* | ||
| 521 | * Ordinarily, memory holes in flatmem still have a valid | ||
| 522 | * memmap for the PFN range. However, an architecture for | ||
| 523 | * embedded systems (e.g. ARM) can free up the memmap backing | ||
| 524 | * holes to save memory on the assumption the memmap is | ||
| 525 | * never used. The page_zone linkages are then broken even | ||
| 526 | * though pfn_valid() returns true. Skip the page if the | ||
| 527 | * linkages are broken. Even if this test passed, the impact | ||
| 528 | * is that the counters for the movable type are off but | ||
| 529 | * fragmentation monitoring is likely meaningless on small | ||
| 530 | * systems. | ||
| 531 | */ | ||
| 532 | if (page_zone(page) != zone) | ||
| 533 | continue; | ||
| 534 | #endif | ||
| 519 | mtype = get_pageblock_migratetype(page); | 535 | mtype = get_pageblock_migratetype(page); |
| 520 | 536 | ||
| 521 | count[mtype]++; | 537 | if (mtype < MIGRATE_TYPES) |
| 538 | count[mtype]++; | ||
| 522 | } | 539 | } |
| 523 | 540 | ||
| 524 | /* Print counts */ | 541 | /* Print counts */ |
