Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp375327pxj; Thu, 10 Jun 2021 03:01:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTfdyXUiIvlBmFdDJxV+ThZsSZ3lGceM8wi/rNWp2ZDVasnG6kWbmWn/PxtI+RkcIyhOng X-Received: by 2002:a17:906:5049:: with SMTP id e9mr3698881ejk.30.1623319315047; Thu, 10 Jun 2021 03:01:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623319315; cv=none; d=google.com; s=arc-20160816; b=Je4woUzE6Dao6YcLtNrJJ6FxYEUq0CWw1clHIMTTO6uQM/xnhEkWqy7VxtQV0XVvTL CV/DMKaV59CbDntyjAuv8X0x0WfMYyYsp1SEiCtoX40idYdNpt/5Hiq7MCHJs+9VF1Is c8SoLuf659x/U3cH/BIMx2QZtDx4LleW6TAwehFKhRhI9sQ0gDbHyNCX93iKs4/COCnl QdWYpH4O57qC3sXBXNdZAHWC0HbX/HuaemAjW1tMyZZrArwkrc1NUHJzQI7ZfCLiGEDI EbrvWHT/UJ4F3xUVR9LSEyuWT1+fKHacsdsZnWiGmj5Nu8+nstHljJzeU5o2OUOM8PxC LdyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=gBT9cBgbszfObFIQ+8NIrK4HBkhGamQu4yAv7aPuVzY=; b=xgCanCnqWkjOpRqefyDQjswvgotMNLyYX1uV3369MhLqAib9h5/1mcroRnH0VFiQXF seh47bwXgavbKDTPyBmpXnqjehuKSIKlm43mTSGmDPnSTQSOhk5z27CuvtA98RFY5kvX J74cpJBVFSiKFmZADavOb0sO0UpkGRodfvCbTl3dV4XvXOsLuN0F7O4LMv1Dm+TzKOBY gvJez/vRO8mlOY4LpzngmwRl0aT1qnIS1+zx2hsREx3ggACoqDoNVwFJDABw+PVN2s63 csApNpHu98JMlx2oBp2BEVcxBO1n1a+kEjIJz66H8cLlHr1b9+Np2UEjTzIzqebXpZjT eQUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Gx6x0mZz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l18si1925260ejx.406.2021.06.10.03.01.31; Thu, 10 Jun 2021 03:01:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Gx6x0mZz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229980AbhFJKC0 (ORCPT + 99 others); Thu, 10 Jun 2021 06:02:26 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:34558 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229770AbhFJKC0 (ORCPT ); Thu, 10 Jun 2021 06:02:26 -0400 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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