From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Nick Piggin <npiggin@suse.de>, wassim dagash <wassim.dagash@gmail.com>
Cc: kosaki.motohiro@jp.fujitsu.com, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: KSWAPD Algorithm - 100% CPU
Date: Fri, 5 Dec 2008 11:53:13 +0900 (JST) [thread overview]
Message-ID: <20081205095905.1D83.KOSAKI.MOTOHIRO@jp.fujitsu.com> (raw)
In-Reply-To: <20081204140200.GA22631@wotan.suse.de>
> kswapd_max_order check and reset should probably go inside
> balance_pgdat:loop_again loop.
>
> It is possible we could have a kswapd_max_order[MAX_NR_ZONES] or
> something, but I don't know if the complexity would be worth while
> given that huge order allocations aren't too common, and resetting
> kswapd_max_order inside the loop should be a reasonable fix.
It seems excellent.
wassim, Could you please test this patch?
==
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Subject: [PATCH] kswapd: add infinite loop stopper
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@gmail.com>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
---
mm/vmscan.c | 10 ++++++++++
1 file changed, 10 insertions(+)
Index: b/mm/vmscan.c
===================================================================
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1921,6 +1921,16 @@ 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 2nd loop or after stop contenious check.
+ */
+ order = sc->order = 0;
+
goto loop_again;
}
prev parent reply other threads:[~2008-12-05 2:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-03 7:04 wassim dagash
2008-12-03 7:20 ` KAMEZAWA Hiroyuki
2008-12-03 9:20 ` KOSAKI Motohiro
2008-12-04 14:02 ` Nick Piggin
2008-12-05 2:53 ` KOSAKI Motohiro [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081205095905.1D83.KOSAKI.MOTOHIRO@jp.fujitsu.com \
--to=kosaki.motohiro@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@suse.de \
--cc=wassim.dagash@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®