diff options
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index 33c332bbab73..33dc256033b5 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -1568,9 +1568,14 @@ shrink_inactive_list(unsigned long nr_to_scan, struct mem_cgroup_zone *mz, | |||
1568 | reclaim_stat->recent_scanned[0] += nr_anon; | 1568 | reclaim_stat->recent_scanned[0] += nr_anon; |
1569 | reclaim_stat->recent_scanned[1] += nr_file; | 1569 | reclaim_stat->recent_scanned[1] += nr_file; |
1570 | 1570 | ||
1571 | if (current_is_kswapd()) | 1571 | if (global_reclaim(sc)) { |
1572 | __count_vm_events(KSWAPD_STEAL, nr_reclaimed); | 1572 | if (current_is_kswapd()) |
1573 | __count_zone_vm_events(PGSTEAL, zone, nr_reclaimed); | 1573 | __count_zone_vm_events(PGSTEAL_KSWAPD, zone, |
1574 | nr_reclaimed); | ||
1575 | else | ||
1576 | __count_zone_vm_events(PGSTEAL_DIRECT, zone, | ||
1577 | nr_reclaimed); | ||
1578 | } | ||
1574 | 1579 | ||
1575 | putback_inactive_pages(mz, &page_list); | 1580 | putback_inactive_pages(mz, &page_list); |
1576 | 1581 | ||
@@ -2107,12 +2112,7 @@ restart: | |||
2107 | * with multiple processes reclaiming pages, the total | 2112 | * with multiple processes reclaiming pages, the total |
2108 | * freeing target can get unreasonably large. | 2113 | * freeing target can get unreasonably large. |
2109 | */ | 2114 | */ |
2110 | if (nr_reclaimed >= nr_to_reclaim) | 2115 | if (nr_reclaimed >= nr_to_reclaim && priority < DEF_PRIORITY) |
2111 | nr_to_reclaim = 0; | ||
2112 | else | ||
2113 | nr_to_reclaim -= nr_reclaimed; | ||
2114 | |||
2115 | if (!nr_to_reclaim && priority < DEF_PRIORITY) | ||
2116 | break; | 2116 | break; |
2117 | } | 2117 | } |
2118 | blk_finish_plug(&plug); | 2118 | blk_finish_plug(&plug); |