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=-2.5 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 6A894C432C0 for ; Wed, 27 Nov 2019 11:41:30 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 37F6A2071E for ; Wed, 27 Nov 2019 11:41:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 37F6A2071E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C45E76B038C; Wed, 27 Nov 2019 06:41:29 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BD0696B038D; Wed, 27 Nov 2019 06:41:29 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AE65D6B038E; Wed, 27 Nov 2019 06:41:29 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0085.hostedemail.com [216.40.44.85]) by kanga.kvack.org (Postfix) with ESMTP id 940E06B038C for ; Wed, 27 Nov 2019 06:41:29 -0500 (EST) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id 4B3F8181AEF15 for ; Wed, 27 Nov 2019 11:41:29 +0000 (UTC) X-FDA: 76201867098.01.mass07_81599543dba2a X-HE-Tag: mass07_81599543dba2a X-Filterd-Recvd-Size: 3119 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Wed, 27 Nov 2019 11:41:28 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id i12so26240996wrn.11 for ; Wed, 27 Nov 2019 03:41:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=slcAIeEbZqDL67dXy4W1xiMxfo21q1ra2oUFiL7L5AI=; b=SSUekbgXzIjVTQ4CknnKZbogVIA3PCKE/PHVSHR0ZaPj2H8D0su1tnD7v8vd9JkWj6 DcBIKbC7YiM+c9AgHSOuExJFvh/lWdNYBdLD4HL06tI0pV5+6qHMX8tWjt55751877Z3 8loqeSVAEZK0PH50Y3SQxZoNhF2DWtyq4zjT0oqg/IH4BfCKxLigT/Jg6z5HtS1LojFT terIgRSZrRqRssO7xv6FghVFWlk+gitUfeKZdJUWjRl7vbAh32PbTBw0ZJA00paJ24on 7SXVRhcgnzNlfGsN3gAiAmgksoLmNhewsDHdVvH5TSmL6nQ3pTH0Ziz+Yuzm6Wn98g8S lcUA== X-Gm-Message-State: APjAAAVoNwn2gBJfDE7QwBG29Yx4cubYWGrx7BUlSXXpP0hY8Q1iPalR Cd01OerOQka8AehKbUpHi0M= X-Google-Smtp-Source: APXvYqyNk7tj0G+uEB7rwiBvZpRAG48ARRb0/MkCNc4SNsbx/K9YcOpV/z9IrqCktM/iT+CYlWW5NQ== X-Received: by 2002:a5d:4a45:: with SMTP id v5mr44003470wrs.288.1574854887586; Wed, 27 Nov 2019 03:41:27 -0800 (PST) Received: from localhost (prg-ext-pat.suse.com. [213.151.95.130]) by smtp.gmail.com with ESMTPSA id 188sm6772643wmz.13.2019.11.27.03.41.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Nov 2019 03:41:26 -0800 (PST) Date: Wed, 27 Nov 2019 12:41:25 +0100 From: Michal Hocko To: David Hildenbrand Cc: Yafang Shao , hannes@cmpxchg.org, vdavydov.dev@gmail.com, akpm@linux-foundation.org, linux-mm@kvack.org Subject: Re: [PATCH v2] mm, memcg: avoid oom if cgroup is not populated Message-ID: <20191127114125.GO20912@dhcp22.suse.cz> References: <1574818117-2885-1-git-send-email-laoar.shao@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) 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 27-11-19 12:11:24, David Hildenbrand wrote: [...] > 4. This patch on its own (if there are no processes, there is nothing to > kill) does not sound too wrong to me. Instead of an endless loop > (besides signals) where we can't make any progress, we exit right away. mem_cgroup_out_of_memory returns false when there is no oom victim selected and then we break out. My main objection to the patch is that it adds a subtle inconsitency. Admins are simply not going to see that the memcg was OOM due to the limit change and OOM killer cannot do anything about that. No tasks vs. no killable task doesn't make any real difference. There is simply no way to get out of that situation. -- Michal Hocko SUSE Labs