From: Michal Hocko <mhocko@kernel.org>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Vladimir Davydov <vdavydov.dev@gmail.com>,
linux-mm@kvack.org, Greg Thelen <gthelen@google.com>,
Dmitry Vyukov <dvyukov@google.com>,
LKML <linux-kernel@vger.kernel.org>,
David Rientjes <rientjes@google.com>
Subject: Re: [PATCH] memcg, oom: be careful about races when warning about no reclaimable task
Date: Tue, 7 Aug 2018 13:04:05 +0200 [thread overview]
Message-ID: <20180807110405.GW10003@dhcp22.suse.cz> (raw)
In-Reply-To: <863d73ce-fae9-c117-e361-12c415c787de@i-love.sakura.ne.jp>
On Tue 07-08-18 19:15:11, Tetsuo Handa wrote:
[...]
> Of course, if the hard limit is 0, all processes will be killed after all. But
> Michal is ignoring the fact that if the hard limit were not 0, there is a chance
> of saving next process from needlessly killed if we waited until "mm of PID=23766
> completed __mmput()" or "mm of PID=23766 failed to complete __mmput() within
> reasonable period".
This is a completely different issue IMHO. I haven't seen reports about
overly eager memcg oom killing so far.
> We can make efforts not to return false at
>
> /*
> * This task has already been drained by the oom reaper so there are
> * only small chances it will free some more
> */
> if (test_bit(MMF_OOM_SKIP, &mm->flags))
> return false;
>
> (I admit that ignoring MMF_OOM_SKIP for once might not be sufficient for memcg
> case), and we can use feedback based backoff like
> "[PATCH 4/4] mm, oom: Fix unnecessary killing of additional processes." *UNTIL*
> we come to the point where the OOM reaper can always reclaim all memory.
The code is quite tricky and I am really reluctant to make it even more
so without seeing this is really hurting real users with real workloads.
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2018-08-07 11:04 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-07 7:25 [PATCH] memcg, oom: be careful about races when warning about no reclaimable task Michal Hocko
2018-08-07 10:15 ` Tetsuo Handa
2018-08-07 11:04 ` Michal Hocko [this message]
2018-08-07 20:19 ` Johannes Weiner
2018-08-07 20:38 ` Tetsuo Handa
2018-08-08 12:57 ` Tetsuo Handa
2018-08-08 13:16 ` Michal Hocko
2018-08-07 20:02 ` Johannes Weiner
2018-08-07 20:23 ` Michal Hocko
2018-08-07 20:54 ` Johannes Weiner
2018-08-08 6:44 ` Michal Hocko
2018-08-08 7:12 ` Michal Hocko
2018-08-08 7:13 ` [PATCH 1/2] " Michal Hocko
2018-08-08 7:13 ` [PATCH 2/2] memcg, oom: emit oom report when there is no eligible task Michal Hocko
2018-08-08 14:45 ` Johannes Weiner
2018-08-08 16:17 ` Michal Hocko
2018-08-21 14:06 ` Michal Hocko
2018-08-21 17:20 ` Johannes Weiner
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=20180807110405.GW10003@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=dvyukov@google.com \
--cc=gthelen@google.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=rientjes@google.com \
--cc=vdavydov.dev@gmail.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).