All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nitin Gupta <ngupta@vflare.org>
To: Minchan Kim <minchan.kim@gmail.com>
Cc: 우충기 <chungki.woo@gmail.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	fengguang.wu@intel.com, riel@redhat.com,
	akpm@linux-foundation.org, kosaki.motohiro@jp.fujitsu.com,
	"Mel Gorman" <mel@csn.ul.ie>
Subject: Re: abnormal OOM killer message
Date: Wed, 19 Aug 2009 09:14:08 +0530	[thread overview]
Message-ID: <4A8B7508.4040001@vflare.org> (raw)
In-Reply-To: <20090819114408.ab9c8a78.minchan.kim@barrios-desktop>

On 08/19/2009 08:14 AM, Minchan Kim wrote:
> On Wed, 19 Aug 2009 10:41:51 +0900
> 우충기<chungki.woo@gmail.com>  wrote:
>
>> Hi all~
>> I have got a log message with OOM below. I don't know why this
>> phenomenon was happened.
>> When direct reclaim routine(try_to_free_pages) in __alloc_pages which
>> allocates kernel memory was failed,
>> one last chance is given to allocate memory before OOM routine is executed.
>> And that time, allocator uses ALLOC_WMARK_HIGH to limit watermark.
>> Then, zone_watermark_ok function test this value with current memory
>> state and decide 'can allocate' or 'cannot allocate'.
>>
>> Here is some kernel source code in __alloc_pages function to understand easily.
>> Kernel version is 2.6.18 for arm11. Memory size is 32Mbyte. And I use
>> compcache(0.5.2).

<snip>

>>
>> In my case, you can see free pages(6804KB) is much more higher than
>> high watermark value(1084KB) in OOM message.
>> And order of allocating is also zero.(order=0)
>> In buddy system, the number of 4kbyte page is 867.
>> So, I think OOM can't be happend.
>>
>
> Yes. I think so.
>
> In that case, even we can also avoid zone defensive algorithm.
>
>> How do you think about this?
>> Is this side effect of compcache?
>

compcache can be storing lot of stale data and this memory space cannot be
reclaimed (unless overwritten by some other swap data). This is because
compcache does not know when a swap slot has been freed and hence does not know 
when its safe to free corresponding memory. You can check current memory usage 
with /proc/ramzswap (see MemUsedTotal).

BTW, with compcache-0.6 there is an experimental kernel patch that gets rid of 
all this stale data:
http://patchwork.kernel.org/patch/41083/

However, this compcache version needs at least kernel 2.6.28. This version also 
fixes all known problems on ARM. compcache-0.5.3 or earlier is known to crash on 
ARM (see: http://code.google.com/p/compcache/issues/detail?id=33).

Thanks,
Nitin

WARNING: multiple messages have this Message-ID (diff)
From: Nitin Gupta <ngupta@vflare.org>
To: Minchan Kim <minchan.kim@gmail.com>
Cc: 우충기 <chungki.woo@gmail.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	fengguang.wu@intel.com, riel@redhat.com,
	akpm@linux-foundation.org, kosaki.motohiro@jp.fujitsu.com,
	"Mel Gorman" <mel@csn.ul.ie>
Subject: Re: abnormal OOM killer message
Date: Wed, 19 Aug 2009 09:14:08 +0530	[thread overview]
Message-ID: <4A8B7508.4040001@vflare.org> (raw)
In-Reply-To: <20090819114408.ab9c8a78.minchan.kim@barrios-desktop>

On 08/19/2009 08:14 AM, Minchan Kim wrote:
> On Wed, 19 Aug 2009 10:41:51 +0900
> i??i?(C)e,?<chungki.woo@gmail.com>  wrote:
>
>> Hi all~
>> I have got a log message with OOM below. I don't know why this
>> phenomenon was happened.
>> When direct reclaim routine(try_to_free_pages) in __alloc_pages which
>> allocates kernel memory was failed,
>> one last chance is given to allocate memory before OOM routine is executed.
>> And that time, allocator uses ALLOC_WMARK_HIGH to limit watermark.
>> Then, zone_watermark_ok function test this value with current memory
>> state and decide 'can allocate' or 'cannot allocate'.
>>
>> Here is some kernel source code in __alloc_pages function to understand easily.
>> Kernel version is 2.6.18 for arm11. Memory size is 32Mbyte. And I use
>> compcache(0.5.2).

<snip>

>>
>> In my case, you can see free pages(6804KB) is much more higher than
>> high watermark value(1084KB) in OOM message.
>> And order of allocating is also zero.(order=0)
>> In buddy system, the number of 4kbyte page is 867.
>> So, I think OOM can't be happend.
>>
>
> Yes. I think so.
>
> In that case, even we can also avoid zone defensive algorithm.
>
>> How do you think about this?
>> Is this side effect of compcache?
>

compcache can be storing lot of stale data and this memory space cannot be
reclaimed (unless overwritten by some other swap data). This is because
compcache does not know when a swap slot has been freed and hence does not know 
when its safe to free corresponding memory. You can check current memory usage 
with /proc/ramzswap (see MemUsedTotal).

BTW, with compcache-0.6 there is an experimental kernel patch that gets rid of 
all this stale data:
http://patchwork.kernel.org/patch/41083/

However, this compcache version needs at least kernel 2.6.28. This version also 
fixes all known problems on ARM. compcache-0.5.3 or earlier is known to crash on 
ARM (see: http://code.google.com/p/compcache/issues/detail?id=33).

Thanks,
Nitin

--
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:[~2009-08-19  3:44 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-19  1:41 abnormal OOM killer message 우충기
2009-08-19  1:41 ` 우충기
2009-08-19  2:44 ` Minchan Kim
2009-08-19  2:44   ` Minchan Kim
2009-08-19  3:44   ` Nitin Gupta [this message]
2009-08-19  3:44     ` Nitin Gupta
2009-08-19  4:51     ` Minchan Kim
2009-08-19  4:51       ` Minchan Kim
2009-08-19  6:24       ` 우충기
2009-08-19  6:24         ` 우충기
2009-08-19  6:49         ` Minchan Kim
2009-08-19  6:49           ` Minchan Kim
2009-08-19  7:14           ` Chungki woo
2009-08-19  7:14             ` Chungki woo
2009-08-19  7:29             ` Minchan Kim
2009-08-19  7:29               ` Minchan Kim
2009-08-19  8:25               ` Nitin Gupta
2009-08-19  8:25                 ` Nitin Gupta
2009-08-19  8:42                 ` Minchan Kim
2009-08-19  8:42                   ` Minchan Kim
2009-08-19 10:36           ` Mel Gorman
2009-08-19 10:36             ` Mel Gorman
2009-08-19 10:52             ` Minchan Kim
2009-08-19 10:52               ` Minchan Kim
2009-08-19 10:58               ` Mel Gorman
2009-08-19 10:58                 ` Mel Gorman
2009-08-19 11:01                 ` Minchan Kim
2009-08-19 11:01                   ` Minchan Kim
2009-08-19 12:06                 ` Chungki woo
2009-08-19 12:06                   ` Chungki woo
2009-08-19 10:18   ` Minchan Kim
2009-08-19 10:18     ` Minchan Kim

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=4A8B7508.4040001@vflare.org \
    --to=ngupta@vflare.org \
    --cc=akpm@linux-foundation.org \
    --cc=chungki.woo@gmail.com \
    --cc=fengguang.wu@intel.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=minchan.kim@gmail.com \
    --cc=riel@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.