Skip to content

Commit

Permalink
mm: vmscan: set zone flags before blocking
Browse files Browse the repository at this point in the history
In shrink_page_list a decision may be made to stall and flag a zone as
ZONE_WRITEBACK so that if a large number of unqueued dirty pages are
encountered later then the reclaimer will stall.  Set ZONE_WRITEBACK
before potentially going to sleep so it is noticed sooner.

Signed-off-by: Mel Gorman <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Cc: Jiri Slaby <[email protected]>
Cc: Valdis Kletnieks <[email protected]>
Cc: Zlatko Calusic <[email protected]>
Cc: dormando <[email protected]>
Cc: Trond Myklebust <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Mel Gorman authored and torvalds committed Jul 3, 2013
1 parent b1a6f21 commit f7ab8db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/vmscan.c
Original file line number Diff line number Diff line change
@@ -1445,8 +1445,8 @@ shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec,
*/
if (nr_writeback && nr_writeback >=
(nr_taken >> (DEF_PRIORITY - sc->priority))) {
wait_iff_congested(zone, BLK_RW_ASYNC, HZ/10);
zone_set_flag(zone, ZONE_WRITEBACK);
wait_iff_congested(zone, BLK_RW_ASYNC, HZ/10);
}

/*

0 comments on commit f7ab8db

Please sign in to comment.