linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: Aaron Tomlin <atomlin@redhat.com>
Cc: Waiman Long <llong@redhat.com>,
	Shakeel Butt <shakeelb@google.com>, Linux MM <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Vlastimil Babka <vbabka@suse.cz>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH] mm/oom_kill: allow oom kill allocating task for non-global case
Date: Thu, 10 Jun 2021 12:00:28 +0200	[thread overview]
Message-ID: <YMHivM+0DRYXzAD0@dhcp22.suse.cz> (raw)
In-Reply-To: <20210609143534.v65qknfihqimiivd@ava.usersys.com>

On Wed 09-06-21 15:35:34, Aaron Tomlin wrote:
> On Tue 2021-06-08 08:22 +0200, Michal Hocko wrote:
> > Is it possible the only eligible task has been killed and oom reaped
> > already?
> 
> Yes, I suspect so; and I had a look at the vmcore, the task in the OOM
> report is no longer present. Therefore, I suspect the task namely "node"
> (i.e. PID 1703345) was OOM killed i.e. a SIGKILL was sent and was granted
> access to memory reserves and selected/or choosen by the OOM reaper for
> termination; the victim then raised a page fault that triggered yet
> another "charge" in the memcg that exceeded the memory limit set on the
> container;

If that was the case then the allocating (charging) task would not hit
the oom path at all
stable/linux-4.18.y:mm/memcontrol.c
try_charge()
        /*
         * Unlike in global OOM situations, memcg is not in a physical
         * memory shortage.  Allow dying and OOM-killed tasks to
         * bypass the last charges so that they can exit quickly and
         * free their memory.
         */
        if (unlikely(tsk_is_oom_victim(current) ||
                     fatal_signal_pending(current) ||
                     current->flags & PF_EXITING))
                goto force;

If you have a crash dump available then you can check the memcg
associate with the allocating task and check whether it is really marked
as OOM victim.

> and since no other task in the memcg had a suitable OOM score
> and the allocating task/or victim was "unkillable" i.e. already selected
> for termination by the OOM reaper, we got the message: "Out of memory and
> no killable processes...".

What do you mean by allocating task being unkillable?

-- 
Michal Hocko
SUSE Labs


  reply	other threads:[~2021-06-10 10:00 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07 16:31 [RFC PATCH] mm/oom_kill: allow oom kill allocating task for non-global case Aaron Tomlin
2021-06-07 16:42 ` Waiman Long
2021-06-07 18:43   ` Shakeel Butt
2021-06-07 18:51     ` Waiman Long
2021-06-07 19:04       ` Michal Hocko
2021-06-07 19:18         ` Waiman Long
2021-06-07 19:36           ` Michal Hocko
2021-06-07 20:03             ` Michal Hocko
2021-06-07 20:44               ` Waiman Long
2021-06-08  6:22                 ` Michal Hocko
2021-06-08  9:39                   ` Aaron Tomlin
2021-06-08 10:00                   ` Aaron Tomlin
2021-06-08 13:58                     ` Michal Hocko
2021-06-08 15:22                       ` Tetsuo Handa
2021-06-08 16:17                         ` Michal Hocko
2021-06-09 14:35                   ` Aaron Tomlin
2021-06-10 10:00                     ` Michal Hocko [this message]
2021-06-10 12:23                       ` Aaron Tomlin
2021-06-10 12:43                         ` Michal Hocko
2021-06-10 13:36                           ` Aaron Tomlin
2021-06-10 14:06                             ` Tetsuo Handa
2021-06-07 20:42             ` Waiman Long
2021-06-07 21:16               ` Aaron Tomlin
2021-06-07 19:04       ` Shakeel Butt
2021-06-07 20:07         ` Waiman Long
2021-06-07 19:01 ` Michal Hocko
2021-06-07 19:26   ` Waiman Long
2021-06-07 19:47     ` Michal Hocko
2021-06-07 21:17   ` Aaron Tomlin

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=YMHivM+0DRYXzAD0@dhcp22.suse.cz \
    --to=mhocko@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=atomlin@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=llong@redhat.com \
    --cc=shakeelb@google.com \
    --cc=vbabka@suse.cz \
    /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).