linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Will Newton <will.newton@gmail.com>
To: Mel Gorman <mel@csn.ul.ie>
Cc: linux-mm@kvack.org
Subject: Re: Commit f50de2d38 seems to be breaking my oom killer
Date: Thu, 7 Jan 2010 14:15:42 +0000	[thread overview]
Message-ID: <87a5b0801001070615p42268d77k66d472eff7a0e9fa@mail.gmail.com> (raw)
In-Reply-To: <20100107135831.GA29564@csn.ul.ie>

On Thu, Jan 7, 2010 at 1:58 PM, Mel Gorman <mel@csn.ul.ie> wrote:
> On Thu, Jan 07, 2010 at 12:34:54PM +0000, Will Newton wrote:
>> Hi,
>>
>> I'm having some problems on a small embedded box with 24Mb of RAM and
>> no swap. If a process tries to use large amounts of memory and gets
>> OOM killed, with 2.6.32 it's fine, but with 2.6.33-rc2 kswapd gets
>> stuck and the system locks up.
>
> By stuck, do you mean it consumes 100% CPU and never goes to sleep?

I assume so. The system sems locked up so ctrl-c of the process
doesn't work and I can't get in via telnet. Looking where the pc and
return pointer are going via JTAG leads me to believe it's stuck in
kswapd.

>> The problem appears to have been
>> introduced with f50de2d38. If I change sleeping_prematurely to skip
>> the for_each_populated_zone test then OOM killing operates as
>> expected. I'm guessing it's caused by the new code not allowing kswapd
>> to schedule when it is required to let the killed task exit. Does that
>> sound plausible?
>>
>
> It's conceivable. The expectation was that the cond_resched() in
> balance_pgdat() should have been called at
>
>        if (!all_zones_ok) {
>                cond_resched();
>
> But it would appear that if all zones are unreclaimable, all_zones_ok == 1.
> It could be looping there indefinitly never calling schedule because it
> never reaches the points where cond_resched is called.
>
>> I'll try and investigate further into what's going on.
>>
>
> Can you try the following?
>
> ==== CUT HERE ====
> vmscan: kswapd should notice that all zones are not ok if they are unreclaimble
>
> In the event all zones are unreclaimble, it is possible for kswapd to
> never go to sleep because "all zones are ok even though watermarks are
> not reached". It gets into a situation where cond_reched() is not
> called.
>
> This patch notes that if all zones are unreclaimable then the zones are
> not ok and cond_resched() should be called.
>
> Signed-off-by: Mel Gorman <mel@csn.ul.ie>

This fixes the problem, thanks for the quick response!

Tested-by: Will Newton <will.newton@gmail.com>

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2010-01-07 14:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-07 12:34 Commit f50de2d38 seems to be breaking my oom killer Will Newton
2010-01-07 13:58 ` Mel Gorman
2010-01-07 14:15   ` Will Newton [this message]
2010-01-07 14:49     ` Mel Gorman
2010-01-08  1:58   ` Minchan Kim
2010-01-08  2:56     ` KOSAKI Motohiro
2010-01-08  4:08       ` KOSAKI Motohiro
2010-01-08  4:53         ` Minchan Kim
2010-01-08  5:10         ` Rik van Riel
2010-01-08  9:25         ` Mel Gorman
2010-01-08  9:32           ` KOSAKI Motohiro
2010-01-08 11:18         ` Will Newton
2010-01-10 14:37         ` Wu Fengguang

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=87a5b0801001070615p42268d77k66d472eff7a0e9fa@mail.gmail.com \
    --to=will.newton@gmail.com \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    /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;
as well as URLs for NNTP newsgroup(s).