linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
To: zhongjiang@huawei.com
Cc: mhocko@suse.cz, akpm@linux-foundation.org, vbabka@suse.cz,
	rientjes@google.com, linux-mm@kvack.org, qiuxishi@huawei.com,
	guohanjun@huawei.com, hughd@google.com
Subject: Re: [PATCH] mm: fix oom work when memory is under pressure
Date: Sun, 18 Sep 2016 15:13:18 +0900	[thread overview]
Message-ID: <201609181513.FBI69733.FFFHOMLQOJOSVt@I-love.SAKURA.ne.jp> (raw)
In-Reply-To: <201609181500.HIC05206.QJOFMOFHOFtLVS@I-love.SAKURA.ne.jp>

Tetsuo Handa wrote:
> As of 4.8-rc6, the OOM reaper cannot take mmap_sem for read at __oom_reap_task()
> because of TIF_MEMDIE thread waiting at ksm_exit() from __mmput() from mmput()
>  from exit_mm() from do_exit(). Thus, __oom_reap_task() returns false and
> oom_reap_task() will emit "oom_reaper: unable to reap pid:%d (%s)\n" message.
> Then, oom_reap_task() clears TIF_MEMDIE from that thread, which in turn
> makes oom_scan_process_thread() not to return OOM_SCAN_ABORT because
> atomic_read(&task->signal->oom_victims) becomes 0 due to exit_oom_victim()
> by the OOM reaper. Then, the OOM killer selects next OOM victim because
> ksmd is waking up the OOM killer via a __GFP_FS allocation request.

Oops. As of 4.8-rc6, __oom_reap_task() returns true because of
find_lock_task_mm() returning NULL. Thus, oom_reap_task() clears TIF_MEMDIE
without emitting "oom_reaper: unable to reap pid:%d (%s)\n" message.

> 
> Thus, this bug will be completely solved (at the cost of selecting next
> OOM victim) as of 4.8-rc6.

The conclusion is same.

--
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>

  reply	other threads:[~2016-09-18  6:13 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-06 14:47 zhongjiang
2016-09-09 11:44 ` Michal Hocko
2016-09-12  9:51   ` zhong jiang
2016-09-12 11:13     ` Michal Hocko
2016-09-12 13:42       ` zhong jiang
2016-09-12 17:44         ` Michal Hocko
2016-09-13 13:13           ` zhong jiang
2016-09-13 13:28             ` Michal Hocko
2016-09-13 14:01               ` zhong jiang
2016-09-14  7:13               ` zhong jiang
2016-09-14  8:42                 ` Michal Hocko
2016-09-14  8:50                   ` zhong jiang
2016-09-14  9:05                     ` Michal Hocko
2016-09-14  8:52                   ` Michal Hocko
2016-09-14  9:25                     ` zhong jiang
2016-09-14 11:29                       ` Tetsuo Handa
2016-09-14 13:52                         ` zhong jiang
2016-09-18  6:00                           ` Tetsuo Handa
2016-09-18  6:13                             ` Tetsuo Handa [this message]
2016-09-19  4:44                               ` zhong jiang
2016-09-19  7:15                             ` zhong jiang
2016-09-16 22:13                     ` Hugh Dickins
2016-09-17 15:56                       ` Michal Hocko
2016-09-18  4:04                       ` zhong jiang
2016-09-18 14:42                         ` Michal Hocko
2016-09-19 17:27                           ` 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=201609181513.FBI69733.FFFHOMLQOJOSVt@I-love.SAKURA.ne.jp \
    --to=penguin-kernel@i-love.sakura.ne.jp \
    --cc=akpm@linux-foundation.org \
    --cc=guohanjun@huawei.com \
    --cc=hughd@google.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.cz \
    --cc=qiuxishi@huawei.com \
    --cc=rientjes@google.com \
    --cc=vbabka@suse.cz \
    --cc=zhongjiang@huawei.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