From: William Lee Irwin III <wli@holomorphy.com>
To: Rusty Lynch <rusty@linux.co.intel.com>
Cc: linux-mm@kvack.org
Subject: Re: swapping to death by stressing mlock
Date: Thu, 18 Sep 2003 14:15:50 -0700 [thread overview]
Message-ID: <20030918211550.GW14079@holomorphy.com> (raw)
In-Reply-To: <200309182021.h8IKLnqX006918@penguin.co.intel.com>
On Thu, Sep 18, 2003 at 01:21:49PM -0700, Rusty Lynch wrote:
> While getting more familiar with the vm subsystem I discovered that it is
> fairly easy to lockup my system by mlocking enough memory. I believe what
> is happening is that I am reducing the amount of swappable physical ram
> to the point that try_to_free_pages() will go into an endless loop waiting
> for bdflush to free up some pages.
> I'm guessing this is not a valid condition for a properly configured server,
> but since I'm not feeling very confident about my above explanation, I'm not
> so sure this isn't something to look into.
> On my 2.6.0-test5 kernel I run a little utility that attempts to allocate
> a large enough chunk of memory, touch all pages in the buffer, and then
> mlock the buffer. Just setting vm.overcommit_memory=2 and a real low
> vm.overcommit_ratio doesn't help a lot since all I have to do is squeeze out
> the available physical ram that can be swapped out.
> This is what I see for my offending process if I meta-sysrq-t.
(a) mlock_fixup() ignores the return value of make_pages_present();
it might be a good idea to hand back -ENOMEM if it fail
(b) get_user_pages() (and hence make_pages_present() etc.) should fail
when bad things would otherwise happen.
(c) apart from these two observations, the best I can tell is that
you're thrashing
So, you've seen that wakeup_bdflush() is done repeatedly; is there any
indication such as, say, the address in get_user_pages() to tell you
whether you're making forward progress? Just the fact that's repeatedly
called isn't really enough to make the distinction between livelock and
just being slow.
-- wli
--
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:"aart@kvack.org"> aart@kvack.org </a>
prev parent reply other threads:[~2003-09-18 21:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-18 20:21 Rusty Lynch
2003-09-18 20:46 ` Rusty Lynch
2003-09-18 21:15 ` William Lee Irwin III [this message]
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=20030918211550.GW14079@holomorphy.com \
--to=wli@holomorphy.com \
--cc=linux-mm@kvack.org \
--cc=rusty@linux.co.intel.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