From: Hugh Dickins <hughd@google.com>
To: Rik van Riel <riel@redhat.com>
Cc: Anton Blanchard <anton@samba.org>,
aarcange@redhat.com, mel@csn.ul.ie, akpm@linux-foundation.org,
lkml <linux-kernel@vger.kernel.org>,
linux-mm@kvack.org,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] Re: kswapd stuck using 100% CPU
Date: Sun, 25 Mar 2012 12:16:26 -0700 (PDT) [thread overview]
Message-ID: <alpine.LSU.2.00.1203251212050.1984@eggly.anvils> (raw)
In-Reply-To: <20120324102621.353114da@annuminas.surriel.com>
On Sat, 24 Mar 2012, Rik van Riel wrote:
>
> Only test compaction_suitable if the kernel is built with CONFIG_COMPACTION,
> otherwise the stub compaction_suitable function will always return
> COMPACT_SKIPPED and send kswapd into an infinite loop.
>
> Signed-off-by: Rik van Riel <riel@redhat.com>
> Reported-by: Anton Blanchard <anton@samba.org>
Thank you, Anton and Rik. I never quite got around to investigating
why swapping had been nearly twice as slow with linux-next on my Aspire
One (with a relatively minimal config, omitting COMPACTION). That was
the reason (one half of the HT cpu busy in kswapd), and this fixes it.
Tested-by: Hugh Dickins <hughd@google.com>
>
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 7658fd6..33c332b 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -2946,7 +2946,8 @@ out:
> continue;
>
> /* Would compaction fail due to lack of free memory? */
> - if (compaction_suitable(zone, order) == COMPACT_SKIPPED)
> + if (COMPACTION_BUILD &&
> + compaction_suitable(zone, order) == COMPACT_SKIPPED)
> goto loop_again;
>
> /* Confirm the zone is balanced for order-0 */
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-03-25 19:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-24 2:03 Anton Blanchard
2012-03-24 14:26 ` [PATCH] " Rik van Riel
2012-03-25 19:16 ` Hugh Dickins [this message]
2012-03-26 9:32 ` Mel Gorman
2012-03-26 10:40 ` Pekka Enberg
2012-03-26 13:56 ` Mel Gorman
2012-03-26 15:10 ` Pekka Enberg
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=alpine.LSU.2.00.1203251212050.1984@eggly.anvils \
--to=hughd@google.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=anton@samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
--cc=riel@redhat.com \
--cc=torvalds@linux-foundation.org \
/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