aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/vmscan.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 71f23c0c1090..e01ded365440 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1573,20 +1573,18 @@ shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec,
1573 * If dirty pages are scanned that are not queued for IO, it 1573 * If dirty pages are scanned that are not queued for IO, it
1574 * implies that flushers are not keeping up. In this case, flag 1574 * implies that flushers are not keeping up. In this case, flag
1575 * the zone ZONE_TAIL_LRU_DIRTY and kswapd will start writing 1575 * the zone ZONE_TAIL_LRU_DIRTY and kswapd will start writing
1576 * pages from reclaim context. It will forcibly stall in the 1576 * pages from reclaim context.
1577 * next check.
1578 */ 1577 */
1579 if (nr_unqueued_dirty == nr_taken) 1578 if (nr_unqueued_dirty == nr_taken)
1580 zone_set_flag(zone, ZONE_TAIL_LRU_DIRTY); 1579 zone_set_flag(zone, ZONE_TAIL_LRU_DIRTY);
1581 1580
1582 /* 1581 /*
1583 * In addition, if kswapd scans pages marked marked for 1582 * If kswapd scans pages marked marked for immediate
1584 * immediate reclaim and under writeback (nr_immediate), it 1583 * reclaim and under writeback (nr_immediate), it implies
1585 * implies that pages are cycling through the LRU faster than 1584 * that pages are cycling through the LRU faster than
1586 * they are written so also forcibly stall. 1585 * they are written so also forcibly stall.
1587 */ 1586 */
1588 if ((nr_unqueued_dirty == nr_taken || nr_immediate) && 1587 if (nr_immediate && current_may_throttle())
1589 current_may_throttle())
1590 congestion_wait(BLK_RW_ASYNC, HZ/10); 1588 congestion_wait(BLK_RW_ASYNC, HZ/10);
1591 } 1589 }
1592 1590