linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: linux-mm@kvack.org, rientjes@google.com
Subject: Re: [PATCH 1/2] mm,oom_reaper: Show trace of unable to reap victim thread.
Date: Tue, 20 Mar 2018 15:10:51 +0100	[thread overview]
Message-ID: <20180320141051.GS23100@dhcp22.suse.cz> (raw)
In-Reply-To: <201803202250.CHG18290.FJMOtOHLFVQFOS@I-love.SAKURA.ne.jp>

On Tue 20-03-18 22:50:21, Tetsuo Handa wrote:
> Michal Hocko wrote:
> > On Tue 20-03-18 22:30:16, Tetsuo Handa wrote:
> > > Michal Hocko wrote:
> > > > On Tue 20-03-18 21:52:33, Tetsuo Handa wrote:
> > > > > Michal Hocko wrote:
> > > > > > A single stack trace in the changelog would be sufficient IMHO.
> > > > > > Appart from that. What do you expect users will do about this trace?
> > > > > > Sure they will see a path which holds mmap_sem, we will see a bug report
> > > > > > but we can hardly do anything about that. We simply cannot drop the lock
> > > > > > from that path in 99% of situations. So _why_ do we want to add more
> > > > > > information to the log?
> > > > > 
> > > > > This case is blocked at i_mmap_lock_write().
> > > > 
> > > > But why does i_mmap_lock_write matter for oom_reaping. We are not
> > > > touching hugetlb mappings. dup_mmap holds mmap_sem for write which is
> > > > the most probable source of the backoff.
> > > 
> > > If i_mmap_lock_write can bail out upon SIGKILL, the OOM victim will be able to
> > > release mmap_sem held for write, which helps the OOM reaper not to back off.
> > 
> > There are so many other blocking calls (including allocations) in
> > dup_mmap 
> 
> Yes. But
> 
> >          that I do not really think i_mmap_lock_write is the biggest
> > problem. That will be likely the case for other mmap_sem write lockers.
> 
> i_mmap_lock_write() is one of the problems which we could afford fixing.
> 8 out of 11 "oom_reaper: unable to reap" messages are blocked at i_mmap_lock_write().
> 
[...]
> > Really I am not sure dumping more information is beneficial here.
> 
> Converting to use killable where we can afford is beneficial.

I am no questioning that. I am questioning the additional information
because we won't be able to do anything about mmap_sem holder most of
the time. Because they tend block on allocations...

-- 
Michal Hocko
SUSE Labs

  reply	other threads:[~2018-03-20 14:10 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-20 11:57 [PATCH 1/2] mm,oom_reaper: Show trace of unable to reap victim thread Tetsuo Handa
2018-03-20 11:57 ` [PATCH 2/2] mm,oom_reaper: Correct MAX_OOM_REAP_RETRIES'th attempt Tetsuo Handa
2018-03-20 12:12   ` Michal Hocko
2018-03-20 12:37     ` Tetsuo Handa
2018-03-20 12:47       ` [PATCH 2/2] mm,oom_reaper: Check for MMF_OOM_SKIP before complain Tetsuo Handa
2018-03-20 20:49         ` David Rientjes
2018-03-22 10:46           ` [PATCH] " Tetsuo Handa
2018-03-22 11:59             ` Michal Hocko
2018-03-20 13:24       ` [PATCH 2/2] mm,oom_reaper: Correct MAX_OOM_REAP_RETRIES'th attempt Michal Hocko
2018-03-20 13:37         ` Tetsuo Handa
2018-03-20 13:44           ` Michal Hocko
2018-03-20 12:28 ` [PATCH 1/2] mm,oom_reaper: Show trace of unable to reap victim thread Michal Hocko
2018-03-20 12:52   ` Tetsuo Handa
2018-03-20 13:19     ` Michal Hocko
2018-03-20 13:30       ` Tetsuo Handa
2018-03-20 13:34         ` Michal Hocko
2018-03-20 13:50           ` Tetsuo Handa
2018-03-20 14:10             ` Michal Hocko [this message]
2018-03-20 14:20               ` Tetsuo Handa
2018-03-20 20:46                 ` David Rientjes

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=20180320141051.GS23100@dhcp22.suse.cz \
    --to=mhocko@suse.com \
    --cc=linux-mm@kvack.org \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=rientjes@google.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;
as well as URLs for NNTP newsgroup(s).