diff options
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index 90b46651d158..b797afec3057 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -3587,11 +3587,11 @@ int sysctl_min_unmapped_ratio = 1; | |||
3587 | */ | 3587 | */ |
3588 | int sysctl_min_slab_ratio = 5; | 3588 | int sysctl_min_slab_ratio = 5; |
3589 | 3589 | ||
3590 | static inline unsigned long zone_unmapped_file_pages(struct zone *zone) | 3590 | static inline unsigned long node_unmapped_file_pages(struct pglist_data *pgdat) |
3591 | { | 3591 | { |
3592 | unsigned long file_mapped = node_page_state(zone->zone_pgdat, NR_FILE_MAPPED); | 3592 | unsigned long file_mapped = node_page_state(pgdat, NR_FILE_MAPPED); |
3593 | unsigned long file_lru = node_page_state(zone->zone_pgdat, NR_INACTIVE_FILE) + | 3593 | unsigned long file_lru = node_page_state(pgdat, NR_INACTIVE_FILE) + |
3594 | node_page_state(zone->zone_pgdat, NR_ACTIVE_FILE); | 3594 | node_page_state(pgdat, NR_ACTIVE_FILE); |
3595 | 3595 | ||
3596 | /* | 3596 | /* |
3597 | * It's possible for there to be more file mapped pages than | 3597 | * It's possible for there to be more file mapped pages than |
@@ -3610,17 +3610,17 @@ static unsigned long zone_pagecache_reclaimable(struct zone *zone) | |||
3610 | /* | 3610 | /* |
3611 | * If RECLAIM_UNMAP is set, then all file pages are considered | 3611 | * If RECLAIM_UNMAP is set, then all file pages are considered |
3612 | * potentially reclaimable. Otherwise, we have to worry about | 3612 | * potentially reclaimable. Otherwise, we have to worry about |
3613 | * pages like swapcache and zone_unmapped_file_pages() provides | 3613 | * pages like swapcache and node_unmapped_file_pages() provides |
3614 | * a better estimate | 3614 | * a better estimate |
3615 | */ | 3615 | */ |
3616 | if (zone_reclaim_mode & RECLAIM_UNMAP) | 3616 | if (zone_reclaim_mode & RECLAIM_UNMAP) |
3617 | nr_pagecache_reclaimable = zone_page_state(zone, NR_FILE_PAGES); | 3617 | nr_pagecache_reclaimable = node_page_state(zone->zone_pgdat, NR_FILE_PAGES); |
3618 | else | 3618 | else |
3619 | nr_pagecache_reclaimable = zone_unmapped_file_pages(zone); | 3619 | nr_pagecache_reclaimable = node_unmapped_file_pages(zone->zone_pgdat); |
3620 | 3620 | ||
3621 | /* If we can't clean pages, remove dirty pages from consideration */ | 3621 | /* If we can't clean pages, remove dirty pages from consideration */ |
3622 | if (!(zone_reclaim_mode & RECLAIM_WRITE)) | 3622 | if (!(zone_reclaim_mode & RECLAIM_WRITE)) |
3623 | delta += zone_page_state(zone, NR_FILE_DIRTY); | 3623 | delta += node_page_state(zone->zone_pgdat, NR_FILE_DIRTY); |
3624 | 3624 | ||
3625 | /* Watch for any possible underflows due to delta */ | 3625 | /* Watch for any possible underflows due to delta */ |
3626 | if (unlikely(delta > nr_pagecache_reclaimable)) | 3626 | if (unlikely(delta > nr_pagecache_reclaimable)) |