[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20081230195006.1286.KOSAKI.MOTOHIRO@jp.fujitsu.com>
Date: Tue, 30 Dec 2008 19:55:47 +0900 (JST)
From: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To: LKML <linux-kernel@...r.kernel.org>, linux-mm <linux-mm@...ck.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Nick Piggin <npiggin@...e.de>,
wassim dagash <wassim.dagash@...il.com>
Cc: kosaki.motohiro@...fujitsu.com
Subject: [PATCH] mm: stop kswapd's infinite loop at high order allocation
ok, wassim confirmed this patch works well.
==
From: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Subject: [PATCH] mm: kswapd stop infinite loop at high order allocation
Wassim Dagash reported following kswapd infinite loop problem.
kswapd runs in some infinite loop trying to swap until order 10 of zone
highmem is OK, While zone higmem (as I understand) has nothing to do
with contiguous memory (cause there is no 1-1 mapping) which means
kswapd will continue to try to balance order 10 of zone highmem
forever (or until someone release a very large chunk of highmem).
He proposed remove contenious checking on highmem at all.
However hugepage on highmem need contenious highmem page.
To add infinite loop stopper is simple and good.
Reported-by: wassim dagash <wassim.dagash@...il.com>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
---
mm/vmscan.c | 11 +++++++++++
1 file changed, 11 insertions(+)
Index: b/mm/vmscan.c
===================================================================
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1872,6 +1872,17 @@ out:
try_to_freeze();
+ /*
+ * When highmem is very fragmented,
+ * alloc_pages(GFP_KERNEL, very-high-order) can cause
+ * infinite loop because zone_watermark_ok(highmem) failed.
+ * However, alloc_pages(GFP_KERNEL..) indicate highmem memory
+ * continuousness isn't necessary.
+ * Therefore we don't want contenious check at 2nd loop.
+ */
+ if (nr_reclaimed < SWAP_CLUSTER_MAX)
+ order = sc.order = 0;
+
goto loop_again;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists