From: Andrew Morton <akpm@linux-foundation.org>
To: Sasha Levin <levinsasha928@gmail.com>
Cc: linux-mm@kvack.org, Dave Jones <davej@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Pekka Enberg <penberg@kernel.org>
Subject: Re: OOM killer even when not overcommiting
Date: Mon, 5 Mar 2012 12:04:27 -0800 [thread overview]
Message-ID: <20120305120427.2d11d30e.akpm@linux-foundation.org> (raw)
In-Reply-To: <1330977506.1589.59.camel@lappy>
On Mon, 05 Mar 2012 21:58:26 +0200
Sasha Levin <levinsasha928@gmail.com> wrote:
> Hi all,
> I assumed that when setting overcommit_memory=2 and
> overcommit_ratio<100 that the OOM killer won't ever get invoked (since
> we're not overcommiting memory), but it looks like I'm mistaken since
> apparently a simple mmap from userspace will trigger the OOM killer if
> it requests more memory than available.
>
> Is it how it's supposed to work? Why does it resort to OOM killing
> instead of just failing the allocation?
>
> Here is the dump I get when the OOM kicks in:
>
> ...
>
> [ 3108.730350] [<ffffffff81198e4a>] mlock_vma_pages_range+0x9a/0xa0
> [ 3108.734486] [<ffffffff8119b75b>] mmap_region+0x28b/0x510
> ...
The vma is mlocked for some reason - presumably the app is using
mlockall() or mlock()? So the kernel is trying to instantiate all the
pages at mmap() time.
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: Sasha Levin <levinsasha928@gmail.com>
Cc: linux-mm@kvack.org, Dave Jones <davej@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Pekka Enberg <penberg@kernel.org>
Subject: Re: OOM killer even when not overcommiting
Date: Mon, 5 Mar 2012 12:04:27 -0800 [thread overview]
Message-ID: <20120305120427.2d11d30e.akpm@linux-foundation.org> (raw)
In-Reply-To: <1330977506.1589.59.camel@lappy>
On Mon, 05 Mar 2012 21:58:26 +0200
Sasha Levin <levinsasha928@gmail.com> wrote:
> Hi all,
> I assumed that when setting overcommit_memory=2 and
> overcommit_ratio<100 that the OOM killer won't ever get invoked (since
> we're not overcommiting memory), but it looks like I'm mistaken since
> apparently a simple mmap from userspace will trigger the OOM killer if
> it requests more memory than available.
>
> Is it how it's supposed to work? Why does it resort to OOM killing
> instead of just failing the allocation?
>
> Here is the dump I get when the OOM kicks in:
>
> ...
>
> [ 3108.730350] [<ffffffff81198e4a>] mlock_vma_pages_range+0x9a/0xa0
> [ 3108.734486] [<ffffffff8119b75b>] mmap_region+0x28b/0x510
> ...
The vma is mlocked for some reason - presumably the app is using
mlockall() or mlock()? So the kernel is trying to instantiate all the
pages at mmap() time.
next prev parent reply other threads:[~2012-03-05 20:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-05 19:58 OOM killer even when not overcommiting Sasha Levin
2012-03-05 19:58 ` Sasha Levin
2012-03-05 20:04 ` Andrew Morton [this message]
2012-03-05 20:04 ` Andrew Morton
2012-03-05 20:13 ` Sasha Levin
2012-03-05 20:13 ` Sasha Levin
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=20120305120427.2d11d30e.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=davej@redhat.com \
--cc=levinsasha928@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=tglx@linutronix.de \
/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.