Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3378734ybz; Mon, 4 May 2020 01:42:00 -0700 (PDT) X-Google-Smtp-Source: APiQypLTcarnF6J9pcTqRuh1JvF01jSF9RdddEk2ixbQ+K3gTzsd7dY/khM9y4EkEpnpoiaGdUOh X-Received: by 2002:a17:906:7d1:: with SMTP id m17mr13446598ejc.247.1588581720301; Mon, 04 May 2020 01:42:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588581720; cv=none; d=google.com; s=arc-20160816; b=tgtj9KJHin+0jUFFVKuAVhm/MoufQhr7YEG6qOczSVeqF5FGB7Ey9J9rFs0OBktFFC NvhKsMKoyZCsPLREo242KoLoChZdxJoJ9SBG3Y5j2L+i5Dgc0gdQo4zcmD7QrI6nx3ub 2aa6ABR7kcag2JQOCVcgTFR/DYbRv94Al0m7dM0Mle/IBHoXWnxK0uIuos6iJgzx419i wRvIRlfNgJXWXOZQ1+njXmZ3mKHy1Nob9/1VwKojCEBxjbkpP2BckGUXK/2zxjvdSQGK Som02zH41m9dzlkezieqkjW8CcSBNFv6T5kzuYUL/h4r/u180qgOfLOZRp9cxIKpOHYf WOLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=xSl6evXwDms0DkVG1e4tput3+oyyMpyjg7rDRHrIFnA=; b=aeGd1Tc8YNJm+eXHs8u4hn7t40v92cNZKHzK3YaN9Tmg6lGxmvZMqm20bnAMMTt7Jy kd6oZqShEnC37woaIboUUDcvQ8fRKxMbT7Y8SYT5LMcMBN1ye4adE2EOGoKOQ00g8jRE 90sX+tdKfHjClRR3JQccXjNZ/oz/qQE3/RoywqkDvJOBk45SuKJ/hFYI1dPhvDNMxnGX AibxF90rrLdOQLqzYk6uyPUl8HI7nbEeRf6Os4nWCiDN2QsuHRs1YKli496pehHbuP1h ktcFx8ZkbI0hAwzDdOeC8lh7G3o/4dXVZAA0TOesNW+sapfoSAls3FMfcY+lYaqV6WjN T8YQ== ARC-Authentication-Results: i=1; mx.google.com; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v20si6132295edb.416.2020.05.04.01.41.34; Mon, 04 May 2020 01:42:00 -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; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727891AbgEDG5F (ORCPT + 99 others); Mon, 4 May 2020 02:57:05 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:33304 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726712AbgEDG5F (ORCPT ); Mon, 4 May 2020 02:57:05 -0400 Received: by mail-wr1-f66.google.com with SMTP id h9so9194535wrt.0; Sun, 03 May 2020 23:57:03 -0700 (PDT) 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; bh=xSl6evXwDms0DkVG1e4tput3+oyyMpyjg7rDRHrIFnA=; b=GV4PjIxmJLiqes8RfFYT0i6jdfMfAtv2G0FEnTPa1GinYkC2xp+XAldaICojDbTjnp 9qecKMv+X7d42HythEbK/dCZdem8ShvaiZP1v5xvuN4aajCJje6cq7KWzn5bX4DGJ6U5 jNdHIN4/sU/yYnhZp9JafHnrrb/3XNY/9IukTZIBbQpOUoZqIKPidkkPItx3i1A5hAAY 7F9zzj4J6d1IFFNcpef+7YgUiVbwljGEm2PGytDDF0+llSysxOvD/T69tk4luJoKBThI u8yRzmIGPQpzBd0w3uleUDe70Wf2eYf5eLhToUr/NLHNGYq/hbEqoyOsC5QawWA2M2EZ Fa7Q== X-Gm-Message-State: AGi0Pubg5xRo86Dr76rq/dAQzir1lfqQbP23+Q7Zm1hb5JZh2aU0NFsN fBysjktsdL45uDf7w3X+0Eg= X-Received: by 2002:adf:ea05:: with SMTP id q5mr3472116wrm.87.1588575422941; Sun, 03 May 2020 23:57:02 -0700 (PDT) Received: from localhost (ip-37-188-183-9.eurotel.cz. [37.188.183.9]) by smtp.gmail.com with ESMTPSA id k184sm11193286wmf.9.2020.05.03.23.57.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 May 2020 23:57:02 -0700 (PDT) Date: Mon, 4 May 2020 08:57:01 +0200 From: Michal Hocko To: Shakeel Butt Cc: Johannes Weiner , Roman Gushchin , Greg Thelen , Andrew Morton , Linux MM , Cgroups , LKML Subject: Re: [PATCH] memcg: oom: ignore oom warnings from memory.max Message-ID: <20200504065701.GB22838@dhcp22.suse.cz> References: <20200430182712.237526-1-shakeelb@google.com> <20200430192907.GA2436@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 30-04-20 13:20:10, Shakeel Butt wrote: > On Thu, Apr 30, 2020 at 12:29 PM Johannes Weiner wrote: > > > > On Thu, Apr 30, 2020 at 11:27:12AM -0700, Shakeel Butt wrote: > > > Lowering memory.max can trigger an oom-kill if the reclaim does not > > > succeed. However if oom-killer does not find a process for killing, it > > > dumps a lot of warnings. > > > > > > Deleting a memcg does not reclaim memory from it and the memory can > > > linger till there is a memory pressure. One normal way to proactively > > > reclaim such memory is to set memory.max to 0 just before deleting the > > > memcg. However if some of the memcg's memory is pinned by others, this > > > operation can trigger an oom-kill without any process and thus can log a > > > lot un-needed warnings. So, ignore all such warnings from memory.max. > > > > Can't you set memory.high=0 instead? It does the reclaim portion of > > memory.max, without the actual OOM killing that causes you problems. > > Yes that would work but remote charging concerns me. Remote charging > can still happen after the memcg is offlined and at the moment, high > reclaim does not work for remote memcg and the usage can go till max > or global pressure. This is most probably a misconfiguration and we > might not receive the warnings in the log ever. Setting memory.max to > 0 will definitely give such warnings. Can we add a warning for the remote charging on dead memcgs? -- Michal Hocko SUSE Labs