From: Michal Hocko <mhocko@kernel.org>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: linux-mm@kvack.org
Subject: Re: mm: Can we bail out p?d_alloc() loops upon SIGKILL?
Date: Fri, 1 Mar 2019 12:49:47 +0100 [thread overview]
Message-ID: <20190301114947.GH10588@dhcp22.suse.cz> (raw)
In-Reply-To: <f64326a8-092d-0d13-3795-4d01d242379c@i-love.sakura.ne.jp>
On Fri 01-03-19 19:30:54, Tetsuo Handa wrote:
> On 2019/02/28 18:26, Michal Hocko wrote:
> > We cannot do anything about the preemption so that is moot. ALLOC_OOM
> > reserve is limited so the failure should happen sooner or later. But
>
> The problem is that preemption can slowdown ALLOC_OOM allocations (at e.g.
> cond_resched() from direct reclaim path). Since concurrently allocating
> threads can consume CPU time, the OOM reaper can fail to wait for the OOM
> victim to complete (or fail) ALLOC_OOM allocations.
But this is an inherent problem and we cannot do anything about it
except for increasing the time the reaper keeps retrying.
> > I would be OK to check for fatal_signal_pending once per pmd or so if
> > that helps and it doesn't add a noticeable overhead.
>
> Another option is to scatter __GFP_NOMEMALLOC to allocations which might
> be used from fork() path.
This is not really maintainable. Page table allocations are used for
other purposes as well, not to mention that each arch would have to do
the same. Why don't you simply try the fatal_signal_panding per pmd for
starter. Then we can tune the retry cound for the oom reaper.
--
Michal Hocko
SUSE Labs
prev parent reply other threads:[~2019-03-01 11:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-27 3:43 mm: Can we bail out p?d_alloc() loops upon SIGKILL? Tetsuo Handa
2019-02-27 9:21 ` Michal Hocko
2019-02-27 10:39 ` Tetsuo Handa
2019-02-28 9:26 ` Michal Hocko
2019-03-01 10:30 ` Tetsuo Handa
2019-03-01 11:49 ` Michal Hocko [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=20190301114947.GH10588@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=linux-mm@kvack.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
/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).