aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@cmpxchg.org>2017-02-24 17:56:17 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-24 20:46:54 -0500
commitbbef938429f5b201f9972f399a04f01af1934cc2 (patch)
tree5203c68222408be195d209e1133c63ddae3faec1 /mm/vmscan.c
parent726d061fbd3658e4bfeffa1b8e82da97de2ca4dd (diff)
mm: vmscan: remove old flusher wakeup from direct reclaim path
Direct reclaim has been replaced by kswapd reclaim in pretty much all common memory pressure situations, so this code most likely doesn't accomplish the described effect anymore. The previous patch wakes up flushers for all reclaimers when we encounter dirty pages at the tail end of the LRU. Remove the crufty old direct reclaim invocation. Link: http://lkml.kernel.org/r/20170123181641.23938-4-hannes@cmpxchg.org Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Minchan Kim <minchan@kernel.org> Acked-by: Michal Hocko <mhocko@suse.com> Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 83c92b866afe..ce2ee8331414 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2757,8 +2757,6 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
2757 struct scan_control *sc) 2757 struct scan_control *sc)
2758{ 2758{
2759 int initial_priority = sc->priority; 2759 int initial_priority = sc->priority;
2760 unsigned long total_scanned = 0;
2761 unsigned long writeback_threshold;
2762retry: 2760retry:
2763 delayacct_freepages_start(); 2761 delayacct_freepages_start();
2764 2762
@@ -2771,7 +2769,6 @@ retry:
2771 sc->nr_scanned = 0; 2769 sc->nr_scanned = 0;
2772 shrink_zones(zonelist, sc); 2770 shrink_zones(zonelist, sc);
2773 2771
2774 total_scanned += sc->nr_scanned;
2775 if (sc->nr_reclaimed >= sc->nr_to_reclaim) 2772 if (sc->nr_reclaimed >= sc->nr_to_reclaim)
2776 break; 2773 break;
2777 2774
@@ -2784,20 +2781,6 @@ retry:
2784 */ 2781 */
2785 if (sc->priority < DEF_PRIORITY - 2) 2782 if (sc->priority < DEF_PRIORITY - 2)
2786 sc->may_writepage = 1; 2783 sc->may_writepage = 1;
2787
2788 /*
2789 * Try to write back as many pages as we just scanned. This
2790 * tends to cause slow streaming writers to write data to the
2791 * disk smoothly, at the dirtying rate, which is nice. But
2792 * that's undesirable in laptop mode, where we *want* lumpy
2793 * writeout. So in laptop mode, write out the whole world.
2794 */
2795 writeback_threshold = sc->nr_to_reclaim + sc->nr_to_reclaim / 2;
2796 if (total_scanned > writeback_threshold) {
2797 wakeup_flusher_threads(laptop_mode ? 0 : total_scanned,
2798 WB_REASON_VMSCAN);
2799 sc->may_writepage = 1;
2800 }
2801 } while (--sc->priority >= 0); 2784 } while (--sc->priority >= 0);
2802 2785
2803 delayacct_freepages_end(); 2786 delayacct_freepages_end();