The patch titled mm: vmscan: if kswapd has been running too long, allow it to sleep has been removed from the -mm tree. Its filename was mm-vmscan-if-kswapd-has-been-running-too-long-allow-it-to-sleep.patch This patch was dropped because an updated version will be merged The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: mm: vmscan: if kswapd has been running too long, allow it to sleep From: Mel Gorman <mgorman@xxxxxxx> Under constant allocation pressure, kswapd can be in the situation where sleeping_prematurely() will always return true even if kswapd has been running a long time. Check if kswapd needs to be scheduled. Signed-off-by: Mel Gorman <mgorman@xxxxxxx> Acked-by: Rik van Riel <riel@xxxxxxxxxx> Cc: James Bottomley <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx> Cc: Colin King <colin.king@xxxxxxxxxxxxx> Cc: Raghavendra D Prabhu <raghu.prabhu13@xxxxxxxxx> Cc: Jan Kara <jack@xxxxxxx> Cc: Chris Mason <chris.mason@xxxxxxxxxx> Cc: Christoph Lameter <cl@xxxxxxxxx> Cc: Pekka Enberg <penberg@xxxxxxxxxx> Cc: Rik van Riel <riel@xxxxxxxxxx> Cc: Minchan Kim <minchan.kim@xxxxxxxxx> Cc: <stable@xxxxxxxxxx> [2.6.38+] Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/vmscan.c | 4 ++++ 1 file changed, 4 insertions(+) diff -puN mm/vmscan.c~mm-vmscan-if-kswapd-has-been-running-too-long-allow-it-to-sleep mm/vmscan.c --- a/mm/vmscan.c~mm-vmscan-if-kswapd-has-been-running-too-long-allow-it-to-sleep +++ a/mm/vmscan.c @@ -2251,6 +2251,10 @@ static bool sleeping_prematurely(pg_data unsigned long balanced = 0; bool all_zones_ok = true; + /* If kswapd has been running too long, just sleep */ + if (need_resched()) + return false; + /* If a direct reclaimer woke kswapd within HZ/10, it's premature */ if (remaining) return true; _ Patches currently in -mm which might be from mgorman@xxxxxxx are mm-vmscan-correct-use-of-pgdat_balanced-in-sleeping_prematurely.patch mm-page_allocc-prevent-unending-loop-in-__alloc_pages_slowpath.patch memcg-remove-unused-retry-signal-from-reclaim.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html