Skip to content

Commit bbef938

Browse files
hnaztorvalds
authored andcommitted
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/[email protected] Signed-off-by: Johannes Weiner <[email protected]> Acked-by: Minchan Kim <[email protected]> Acked-by: Michal Hocko <[email protected]> Acked-by: Hillf Danton <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Rik van Riel <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 726d061 commit bbef938

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

mm/vmscan.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2757,8 +2757,6 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
27572757
struct scan_control *sc)
27582758
{
27592759
int initial_priority = sc->priority;
2760-
unsigned long total_scanned = 0;
2761-
unsigned long writeback_threshold;
27622760
retry:
27632761
delayacct_freepages_start();
27642762

@@ -2771,7 +2769,6 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
27712769
sc->nr_scanned = 0;
27722770
shrink_zones(zonelist, sc);
27732771

2774-
total_scanned += sc->nr_scanned;
27752772
if (sc->nr_reclaimed >= sc->nr_to_reclaim)
27762773
break;
27772774

@@ -2784,20 +2781,6 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
27842781
*/
27852782
if (sc->priority < DEF_PRIORITY - 2)
27862783
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-
}
28012784
} while (--sc->priority >= 0);
28022785

28032786
delayacct_freepages_end();

0 commit comments

Comments
 (0)