From: Michal Hocko <mhocko@kernel.org>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: linux-mm@kvack.org, rientjes@google.com,
akpm@linux-foundation.org, oleg@redhat.com,
vdavydov@parallels.com
Subject: Re: [RFC PATCH] mm, oom_reaper: do not attempt to reap a task more than twice
Date: Mon, 30 May 2016 13:57:19 +0200 [thread overview]
Message-ID: <20160530115719.GV22928@dhcp22.suse.cz> (raw)
In-Reply-To: <201605282122.HAD09894.SFOFHtOVJLOQMF@I-love.SAKURA.ne.jp>
On Sat 28-05-16 21:22:08, Tetsuo Handa wrote:
> Tetsuo Handa wrote:
> > Michal Hocko wrote:
> > > We could very well do
> > > diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> > > index bcb6d3b26c94..d9017b8c7300 100644
> > > --- a/mm/oom_kill.c
> > > +++ b/mm/oom_kill.c
> > > @@ -813,6 +813,7 @@ void oom_kill_process(struct oom_control *oc, struct task_struct *p,
> > > * memory might be still used.
> > > */
> > > can_oom_reap = false;
> > > + set_bit(MMF_OOM_REAPED, mm->flags);
> > > continue;
> > > }
> > > if (p->signal->oom_score_adj == OOM_ADJUST_MIN)
> > >
> > > with the same result. If you _really_ think that this would make a
> > > difference I could live with that. But I am highly skeptical this
> > > matters all that much.
>
> Usage of set_bit() above and below are both wrong. The mm used by
> kernel thread via use_mm() will become OOM reapable after unuse_mm().
Please note that all other holders of that mm are gone by that time. So
unuse_mm will simply drop the last reference of the mm and do the
remaining clean up. There is no real reason this mm should be around and
visible by the oom killer.
--
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:[~2016-05-30 11:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-26 15:27 Michal Hocko
2016-05-27 10:31 ` Tetsuo Handa
2016-05-27 12:23 ` Michal Hocko
2016-05-27 13:18 ` [RFC PATCH] mm, oom_reaper: do not attempt to reap a task morethan twice Tetsuo Handa
2016-05-27 13:35 ` Michal Hocko
2016-05-27 16:24 ` [RFC PATCH] mm, oom_reaper: do not attempt to reap a task more than twice Tetsuo Handa
2016-05-28 12:22 ` Tetsuo Handa
2016-05-30 11:57 ` Michal Hocko [this message]
2016-05-30 11:55 ` 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=20160530115719.GV22928@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=oleg@redhat.com \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=rientjes@google.com \
--cc=vdavydov@parallels.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