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 2E5A9C48BD1 for ; Thu, 10 Jun 2021 10:00:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0F96E613DD for ; Thu, 10 Jun 2021 10:00:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230055AbhFJKC1 (ORCPT ); Thu, 10 Jun 2021 06:02:27 -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