From: Andrew Morton <akpm@digeo.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: joern@wohnheim.fh-wedel.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] stop swapoff 3/3 OOMkill
Date: Thu, 17 Apr 2003 14:55:27 -0700 [thread overview]
Message-ID: <20030417145527.00de9fb6.akpm@digeo.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0304172147330.2039-100000@localhost.localdomain>
Hugh Dickins <hugh@veritas.com> wrote:
>
> Current behaviour is that once swapoff has filled memory, other tasks
> get OOMkilled one by one until it completes, or more likely hangs.
> Better that swapoff be the first choice for OOMkill.
This calls for __GFP_NORETRY. It will disable the oom-kill and the infinite
retry in the page allocator. So we will have:
__GFP_REPEAT:
retry the allocation, but the caller can handle a failure.
eg: pte_alloc_one().
__GFP_REPEAT _may_ end up returning NULL. It depends on the VM
implemention - eg it would in -aa kernels.
__GFP_NOFAIL:
retry the allocation inifinitely, regardless of the VM implementation.
For jbd_kmalloc() and others.
__GFP_NORETRY:
Don't oom-kill and don't retry. For swapoff.
I've implemented a __GFP_REPEAT, and don't like it, because it blurs the
__GFP_REPEAT and __GFP_NOFAIL requirements. I'll add __GFP_NORETRY and we
can then pass that into read_swap_cache_async() and handle the error.
Sound good?
next prev parent reply other threads:[~2003-04-17 21:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-17 20:46 [PATCH] stop swapoff 1/3 vm_enough_memory? Hugh Dickins
2003-04-17 20:47 ` [PATCH] stop swapoff 2/3 EINTR Hugh Dickins
2003-04-17 20:49 ` [PATCH] stop swapoff 3/3 OOMkill Hugh Dickins
2003-04-17 21:55 ` Andrew Morton [this message]
2003-04-17 23:10 ` Hugh Dickins
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=20030417145527.00de9fb6.akpm@digeo.com \
--to=akpm@digeo.com \
--cc=hugh@veritas.com \
--cc=joern@wohnheim.fh-wedel.de \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).