From: Michal Hocko <mhocko@suse.com>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
rientjes@google.com, mjaggi@caviumnetworks.com, oleg@redhat.com,
vdavydov@virtuozzo.com
Subject: Re: [PATCH] mm, oom: task_will_free_mem(current) should ignore MMF_OOM_SKIP for once.
Date: Thu, 3 Aug 2017 10:14:59 +0200 [thread overview]
Message-ID: <20170803081459.GD12521@dhcp22.suse.cz> (raw)
In-Reply-To: <201708031653.JGD57352.OQFtVLSFOMOHJF@I-love.SAKURA.ne.jp>
On Thu 03-08-17 16:53:40, Tetsuo Handa wrote:
> Michal Hocko wrote:
> > > We don't need to give up task_will_free_mem(current) without trying
> > > allocation from memory reserves. We will need to select next OOM victim
> > > only when allocation from memory reserves did not help.
> > >
> > > Thus, this patch allows task_will_free_mem(current) to ignore MMF_OOM_SKIP
> > > for once so that task_will_free_mem(current) will not start selecting next
> > > OOM victim without trying allocation from memory reserves.
> >
> > As I've already said this is an ugly hack and once we have
> > http://lkml.kernel.org/r/20170727090357.3205-2-mhocko@kernel.org merged
> > then it even shouldn't be needed because _all_ threads of the oom victim
> > will have an instant access to memory reserves.
> >
> > So I do not think we want to merge this.
> >
>
> No, we still want to merge this, for 4.8+ kernels which won't get your patch
> backported will need this. Even after your patch is merged, there is a race
> window where allocating threads are between after gfp_pfmemalloc_allowed() and
> before mutex_trylock(&oom_lock) in __alloc_pages_may_oom() which means that
> some threads could call out_of_memory() and hit this task_will_free_mem(current)
> test. Ignoring MMF_OOM_SKIP for once is still useful.
I disagree. I am _highly_ skeptical this is a stable material. The
mentioned test case is artificial and the source of the problem is
somewhere else. Moreover the culprit is somewhere else. It is in the oom
reaper setting MMF_OOM_SKIP too early and it should be addressed there.
Do not add workarounds where they are not appropriate.
--
Michal Hocko
SUSE Labs
--
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:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-08-03 8:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-02 23:55 Tetsuo Handa
2017-08-03 0:04 ` Andrew Morton
2017-08-03 7:10 ` Michal Hocko
2017-08-03 7:53 ` Tetsuo Handa
2017-08-03 8:14 ` Michal Hocko [this message]
2017-08-04 11:10 ` Tetsuo Handa
2017-08-04 11:26 ` Michal Hocko
2017-08-04 11:44 ` Tetsuo Handa
2017-08-04 11:52 ` Michal Hocko
2017-08-04 11:54 ` Manish Jaggi
2017-08-04 15:24 ` Tetsuo Handa
2017-08-04 15:54 ` Tetsuo Handa
2017-08-19 6:23 ` [PATCH v2] " Tetsuo Handa
2017-08-21 8:43 ` Michal Hocko
2017-08-21 11:41 ` Tetsuo Handa
2017-08-21 12:10 ` Michal Hocko
2017-08-21 12:57 ` Tetsuo Handa
2017-08-21 13:18 ` Michal Hocko
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=20170803081459.GD12521@dhcp22.suse.cz \
--to=mhocko@suse.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=mjaggi@caviumnetworks.com \
--cc=oleg@redhat.com \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=rientjes@google.com \
--cc=vdavydov@virtuozzo.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