From: "Stephen C. Tweedie" <sct@redhat.com>
To: Bill Hawes <whawes@star.net>
Cc: "Stephen C. Tweedie" <sct@redhat.com>,
Linus Torvalds <torvalds@transmeta.com>,
Alan Cox <number6@the-village.bc.nu>,
"David S. Miller" <davem@dm.cobaltmicro.com>,
Ingo Molnar <mingo@valerie.inf.elte.hu>,
Mark Hemment <markhe@nextd.demon.co.uk>,
linux-mm@kvack.org, linux-kernel@vger.rutgers.edu
Subject: Re: Good and bad news on 2.1.110, and a fix
Date: Thu, 23 Jul 1998 18:30:10 +0100 [thread overview]
Message-ID: <199807231730.SAA13687@dax.dcs.ed.ac.uk> (raw)
In-Reply-To: <35B75FE8.63173E88@star.net>
Hi,
On Thu, 23 Jul 1998 12:08:08 -0400, Bill Hawes <whawes@star.net> said:
> Your change to track the maximum failed allocation looks helpful, as
> this will focus extra swap attention when a problem actually occurs. So
> assuming that the client has a retry capability (as with NFS), it should
> improve recoverability.
> One possible downside is that kswapd infinite looping may become more
> likely, as we still have no way to determine when the memory
> configuration makes it impossible to achieve the memory goal. I still
> see this "swap deadlock" in 110 (and all recent kernels) under low
> memory or by doing a swapoff. Any ideas on how to best determine an
> infeasible memory configuration?
Yes. One thing I had toyed with, and have implemented on test kernels
based on 2.1.108, was simply to keep a history of VM activity so that we
only base swapping performance on recent requests. Ageing the
max_failed_order variable so that it is reset every second or so would
at least prevent a swap deadlock if the large allocation was only a
one-off event, but won't help if there is something like NFS repeatedly
demanding the memory.
That said, if NFS is deadlocked on a large allocation, then we have a
hung machine _anyway_, and if a swap storm is the only conceivable way
out of it, it's not clear that it's a bad thing to do!
> Under some conditions the most helpful action may be to let some
> allocations fail, to shed load or kill processes. (But selecting the
> right process to kill may not be easy ...)
Yes, and one thing we should perhaps do is to limit pageable allocations
such that they never exhaust the supply of higher order pages
completely. However, that still won't help if it's atomic allocations
which are causing the shortage. In this case, probably the only hope of
progress is a swapper which can actively return entire free zones.
Hmm, how about this for a thought: why not stall all pageable
allocations completely if we get into this situation, and give the
swapper enough breathing space to get a higher order page free? The
situation should be sufficiently infrequent that it shouldn't impact
performance at all, and there are very few places which would need to
pass the new GFP_PAGEABLE flag into get_free_pages (or we could simply
apply it to all __GFP_LOW/__GFP_WAIT allocations).
This will still fail if *all* user memory is fragmented, but the zoned
allocator would fix that too. However, we're now getting into the
realms of the extremely unlikely, so it's probably not important to go
that far unless we have benchmarks which show it to be a problem.
I'm off at a wedding until Monday, so feel free to implement something
over the weekend yourself. :)
--Stephen
--
This is a majordomo managed list. To unsubscribe, send a message with
the body 'unsubscribe linux-mm me@address' to: majordomo@kvack.org
next prev parent reply other threads:[~1998-07-23 19:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-07-23 12:48 Stephen C. Tweedie
1998-07-23 16:08 ` Bill Hawes
1998-07-23 17:30 ` Stephen C. Tweedie [this message]
1998-07-23 20:28 ` Rik van Riel
1998-07-27 11:07 ` Stephen C. Tweedie
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=199807231730.SAA13687@dax.dcs.ed.ac.uk \
--to=sct@redhat.com \
--cc=davem@dm.cobaltmicro.com \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--cc=markhe@nextd.demon.co.uk \
--cc=mingo@valerie.inf.elte.hu \
--cc=number6@the-village.bc.nu \
--cc=torvalds@transmeta.com \
--cc=whawes@star.net \
/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