From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
To: mhocko@kernel.org
Cc: hannes@cmpxchg.org, vdavydov@virtuozzo.com, linux-mm@kvack.org
Subject: Re: [PATCH] mm: memcontrol: drop unnecessary task_will_free_mem() check.
Date: Thu, 10 Mar 2016 20:15:06 +0900 [thread overview]
Message-ID: <201603102015.AEG81788.FOFOHFJQLMVOSt@I-love.SAKURA.ne.jp> (raw)
In-Reply-To: <20160309100558.GB27018@dhcp22.suse.cz>
Michal Hocko wrote:
> On Wed 09-03-16 00:15:10, Tetsuo Handa wrote:
> > Since mem_cgroup_out_of_memory() is called by
> > mem_cgroup_oom_synchronize(true) via pagefault_out_of_memory() via
> > page fault, and possible allocations between setting PF_EXITING and
> > calling exit_mm() are tty_audit_exit() and taskstats_exit() which will
> > not trigger page fault, task_will_free_mem(current) in
> > mem_cgroup_out_of_memory() is never true.
>
> What about exit_robust_list called from mm_release?
>
> Anyway I guess we can indeed remove the check because try_charge will
> bypass the charge if we are exiting so we shouldn't even reach this path
> with PF_EXITING. But I haven't double checked. The above changelog seems
> to be incorrect, though.
>
Indeed. do_exit()->exit_mm()->mm_release()->exit_robust_list()->get_user()
can trigger page fault.
--
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>
prev parent reply other threads:[~2016-03-10 11:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-08 15:15 Tetsuo Handa
2016-03-08 18:14 ` Johannes Weiner
2016-03-08 23:05 ` Tetsuo Handa
2016-03-09 10:08 ` Michal Hocko
2016-03-09 10:08 ` Michal Hocko
2016-03-09 10:05 ` Michal Hocko
2016-03-10 11:15 ` Tetsuo Handa [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=201603102015.AEG81788.FOFOHFJQLMVOSt@I-love.SAKURA.ne.jp \
--to=penguin-kernel@i-love.sakura.ne.jp \
--cc=hannes@cmpxchg.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--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