+ vmscan-kswapd-should-notice-that-all-zones-are-not-ok-if-they-are-unreclaimble.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     vmscan: kswapd should notice that all zones are not ok if they are unreclaimble
has been added to the -mm tree.  Its filename is
     vmscan-kswapd-should-notice-that-all-zones-are-not-ok-if-they-are-unreclaimble.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: vmscan: kswapd should notice that all zones are not ok if they are unreclaimble
From: Mel Gorman <mel@xxxxxxxxx>

Commit f50de2d3 ("vmscan: have kswapd sleep for a short interval and
double check it should be asleep") can cause kswapd to enter an infinite
loop if running on a single-CPU system.  If all zones are unreclaimble,
kswapd thinks "all zones are ok" and prepares to go to sleep.  However,
the zones are not ok because the watermarks are not met so it stays awake
but never calls cond_resched().

This patch notes that if all zones are unreclaimable then the zones are
not ok.  It falls through and cond_resched() gets called.

Signed-off-by: Mel Gorman <mel@xxxxxxxxx>
Tested-by: Will Newton <will.newton@xxxxxxxxx>
Cc: Frans Pop <elendil@xxxxxxxxx>
KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>
Acked-by: Rik van Riel <riel@xxxxxxxxxx>
Christoph Lameter <cl@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/vmscan.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff -puN mm/vmscan.c~vmscan-kswapd-should-notice-that-all-zones-are-not-ok-if-they-are-unreclaimble mm/vmscan.c
--- a/mm/vmscan.c~vmscan-kswapd-should-notice-that-all-zones-are-not-ok-if-they-are-unreclaimble
+++ a/mm/vmscan.c
@@ -2027,8 +2027,10 @@ loop_again:
 				break;
 			}
 		}
-		if (i < 0)
+		if (i < 0) {
+			all_zones_ok = 0;
 			goto out;
+		}
 
 		for (i = 0; i <= end_zone; i++) {
 			struct zone *zone = pgdat->node_zones + i;
_

Patches currently in -mm which might be from mel@xxxxxxxxx are

origin.patch
linux-next.patch
page-allocator-fix-update-nr_free_pages-only-as-necessary.patch
mm-page_alloc-fix-the-range-check-for-backward-merging.patch
vmscan-kswapd-should-notice-that-all-zones-are-not-ok-if-they-are-unreclaimble.patch
page-allocator-reduce-fragmentation-in-buddy-allocator-by-adding-buddies-that-are-merging-to-the-tail-of-the-free-lists.patch
nodemaskh-remove-macro-any_online_node.patch
add-debugging-aid-for-memory-initialisation-problems.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

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux