From: William Lee Irwin III <wli@holomorphy.com>
To: Peter Zaitsev <peter@mysql.com>
Cc: Andrew Morton <akpm@osdl.org>,
andrea@suse.de, linux-kernel@vger.kernel.org
Subject: Re: VM Problems in 2.6.7 (Too active OOM Killer)
Date: Wed, 14 Jul 2004 19:33:00 -0700 [thread overview]
Message-ID: <20040715023300.GJ3411@holomorphy.com> (raw)
In-Reply-To: <1089857602.15336.4120.camel@abyss.home>
On Wed, 2004-07-14 at 18:54, William Lee Irwin III wrote:
>> The only method the kernel now has to relocate userspace memory is IO.
>> When mlocked, or if anonymous when there's no swap, it's pinned.
On Wed, Jul 14, 2004 at 07:13:23PM -0700, Peter Zaitsev wrote:
> OK. So it is practically technical difficulty rather than fundamental
> reason ? Why "move to other zone" way is not implemented ? It normally
> should be cheaper than IO ?
There is no technical difficulty, however, do notice there are other forms
of placement-restricted pagecache, i.e. blockdev pagecache, ramdisks, etc.
On Wed, 2004-07-14 at 18:54, William Lee Irwin III wrote:
>> Userspace allocations can also trigger OOM, it's merely that in this
>> case only allocations restricted to ZONE_NORMAL or below, e.g. kernel
>> allocations, are affected. Your memory pressure is restricted to one zone.
On Wed, Jul 14, 2004 at 07:13:23PM -0700, Peter Zaitsev wrote:
> Right. After being explained what without swap you have all pages pinned
> it makes sense. On other hand why user Allocation will trigger OOM if
> there are pages in other zone which still can be used ? Or are there any
> restriction on this ?
Allocations can be requested to come from restricted physical areas.
In this kind of situation, the OOM comes from exhaustion of a physical
area smaller than all of RAM, i.e. ZONE_NORMAL or ZONE_DMA.
The OOM decision-making is noteworthy:
do_retry = 0;
if (!(gfp_mask & __GFP_NORETRY)) {
if ((order <= 3) || (gfp_mask & __GFP_REPEAT))
do_retry = 1;
if (gfp_mask & __GFP_NOFAIL)
do_retry = 1;
}
if (do_retry) {
blk_congestion_wait(WRITE, HZ/50);
goto rebalance;
}
At the rebalance label, failure will only be delivered when the
check if (current->flags & (PF_MEMALLOC|PF_MEMDIE)), otherwise,
__alloc_pages() retries indefinitely and ignores signals.
Furthermore, notice the OOM killer will trip if out_of_memory() is
called more than 10 times in one second, which is plausible for a
single process to do, as it only sleeps for HZ/50 jiffies. More
interestingly, out_of_memory() is never called unless __GFP_FS is set.
On Wed, 2004-07-14 at 18:54, William Lee Irwin III wrote:
>> In order to relocate a userspace page, the kernel performs IO to write
>> the page to some backing store, then lazily faults it back in later. When
>> the userspace page lacks a backing store, e.g. anonymous pages on
>> swapless systems, Linux does not now understand how to relocate them.
On Wed, Jul 14, 2004 at 07:13:23PM -0700, Peter Zaitsev wrote:
> Can't it just be just (theoretically) moved to other zone with
> appropriate system tables modifications ?
> Well anyway it is good to hear "pinned anonymous" is only issue on
> swapless systems. Together with the fact what 2.6 VM does not seems to
> swap without a good reason as 2.4 one did, I perhaps can just have swap
> file enabled.
There is no technical (or even practical) obstacle to implementing
in-core page relocation, only a social one: kernel politics. I would not
be surprised if hotplug memory patches already had code usable for this.
-- wli
next prev parent reply other threads:[~2004-07-15 2:33 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-14 2:23 VM Problems in 2.6.7 (Too active OOM Killer) Peter Zaitsev
2004-07-14 2:40 ` William Lee Irwin III
2004-07-14 3:20 ` Peter Zaitsev
2004-07-14 3:17 ` Andrea Arcangeli
2004-07-14 3:44 ` Peter Zaitsev
2004-07-14 4:10 ` Andrea Arcangeli
2004-07-14 4:22 ` Andrew Morton
2004-07-14 4:47 ` Andrea Arcangeli
2004-07-14 4:17 ` Andrew Morton
2004-07-14 23:47 ` Peter Zaitsev
2004-07-14 22:44 ` Andrew Morton
2004-07-15 0:06 ` Andrea Arcangeli
2004-07-15 0:30 ` Peter Zaitsev
2004-07-15 0:46 ` Andrea Arcangeli
2004-07-15 1:54 ` William Lee Irwin III
2004-07-15 2:13 ` Peter Zaitsev
2004-07-15 2:33 ` William Lee Irwin III [this message]
2004-07-15 2:39 ` William Lee Irwin III
2004-07-15 2:44 ` William Lee Irwin III
2004-08-13 22:23 ` William Lee Irwin III
2004-07-19 20:27 ` Bill Davidsen
2004-07-18 16:13 ` Kurt Garloff
2004-07-20 9:14 ` R. J. Wysocki
2004-07-20 13:29 ` Andrea Arcangeli
2004-07-20 13:53 ` William Lee Irwin III
2004-07-20 13:29 ` William Lee Irwin III
2004-07-19 20:21 ` Bill Davidsen
2004-07-15 0:04 ` Andrea Arcangeli
2004-07-15 0:43 ` Peter Zaitsev
2004-07-15 0:43 ` William Lee Irwin III
2004-07-15 1:04 ` Peter Zaitsev
2004-07-15 1:29 ` William Lee Irwin III
2004-07-14 3:50 ` William Lee Irwin III
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=20040715023300.GJ3411@holomorphy.com \
--to=wli@holomorphy.com \
--cc=akpm@osdl.org \
--cc=andrea@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=peter@mysql.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