The patch titled
mm: vmscan: if kswapd has been running too long, allow it to sleep
has been added to the -mm tree. Its filename is
mm-vmscan-if-kswapd-has-been-running-too-long-allow-it-to-sleep.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this
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 <[email protected]>
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 <[email protected]>
Acked-by: Rik van Riel <[email protected]>
Cc: James Bottomley <[email protected]>
Cc: Colin King <[email protected]>
Cc: Raghavendra D Prabhu <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: Chris Mason <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: <[email protected]> [2.6.38+]
Signed-off-by: Andrew Morton <[email protected]>
---
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 [email protected] are
origin.patch
mm-vmscan-correct-use-of-pgdat_balanced-in-sleeping_prematurely.patch
mm-vmscan-if-kswapd-has-been-running-too-long-allow-it-to-sleep.patch
_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable