From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F2BFC48BE0 for ; Thu, 10 Jun 2021 10:00:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BE15861406 for ; Thu, 10 Jun 2021 10:00:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE15861406 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 206B56B0036; Thu, 10 Jun 2021 06:00:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 18FFA6B0070; Thu, 10 Jun 2021 06:00:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 014D66B0036; Thu, 10 Jun 2021 06:00:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0090.hostedemail.com [216.40.44.90]) by kanga.kvack.org (Postfix) with ESMTP id BF1E66B0036 for ; Thu, 10 Jun 2021 06:00:31 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 634DA180AD81D for ; Thu, 10 Jun 2021 10:00:31 +0000 (UTC) X-FDA: 78237369462.25.1247B0A Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf30.hostedemail.com (Postfix) with ESMTP id 1824FE0009B1 for ; Thu, 10 Jun 2021 10:00:27 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 9D32821977; Thu, 10 Jun 2021 10:00:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1623319229; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gBT9cBgbszfObFIQ+8NIrK4HBkhGamQu4yAv7aPuVzY=; b=Gx6x0mZzJsfX3FYBsXYisQfsQH0SIYsRFnudqF7jRkxpigDpihwrMraMM5uqYsGomnF8w7 y7zCxya3ICuueI/V/J7bm0sMoq/QP6MBMwS/TNrAvjU6ixlKBw9Q6zsDyRCISPcxjmvFsd zfH4ZpG1KwdzjD00KAMDLii9ogCrQ5o= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 56CD5A3B84; Thu, 10 Jun 2021 10:00:29 +0000 (UTC) Date: Thu, 10 Jun 2021 12:00:28 +0200 From: Michal Hocko To: Aaron Tomlin Cc: Waiman Long , Shakeel Butt , Linux MM , Andrew Morton , Vlastimil Babka , LKML Subject: Re: [RFC PATCH] mm/oom_kill: allow oom kill allocating task for non-global case Message-ID: References: <6d23ce58-4c4b-116a-6d74-c2cf4947492b@redhat.com> <353d012f-e8d4-c54c-b33e-54737e1a0115@redhat.com> <20210609143534.v65qknfihqimiivd@ava.usersys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210609143534.v65qknfihqimiivd@ava.usersys.com> X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 1824FE0009B1 X-Stat-Signature: d6ouphbtf1qb8gjswjoyn43twyugctkg Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=Gx6x0mZz; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf30.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com X-HE-Tag: 1623319227-118983 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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