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=-1.0 required=3.0 tests=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 5EF0FC3A5A9 for ; Mon, 4 May 2020 06:57:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2710920746 for ; Mon, 4 May 2020 06:57:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2710920746 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 BE09D8E0006; Mon, 4 May 2020 02:57:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B68E38E0001; Mon, 4 May 2020 02:57:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A313D8E0006; Mon, 4 May 2020 02:57:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0200.hostedemail.com [216.40.44.200]) by kanga.kvack.org (Postfix) with ESMTP id 86C1C8E0001 for ; Mon, 4 May 2020 02:57:04 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 3C91B180AD811 for ; Mon, 4 May 2020 06:57:04 +0000 (UTC) X-FDA: 76778129568.10.rule12_3db2cf27e9b1f X-HE-Tag: rule12_3db2cf27e9b1f X-Filterd-Recvd-Size: 4033 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Mon, 4 May 2020 06:57:03 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id e16so14406088wra.7 for ; 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=nO+45Gw6jGiXr5Sil6bdcoVmk94nW3BrT0jQ6aEhcVJ1+KJkUn2oDW+Hq9kAmBEOvm kMPUoxerMpT6EgSj0psYTbqI3f/tUE2cEFxLy+vEa6cmI7TanAWR0DVrU0C4665rx1Fu 3F9h/3Yh0dVrxyH5eJ/Sl7Qdd9cp7PUOMwaTLNwmW3kSw6XC3yeCTCDFhjeRmV+AXBQc cPA+WbUltpIzcNvigAVpwayxKYuiqDU3wH4Gc6u2tXOBMQDvv2kiI4n4hI810h0MeOrz u4jQlLLaVrgRa9gs//tbCOJpZcXjzgvQ0+mMgrX8GIWqW7XjOx3Uno5JBrP2oLodFNFd B15w== X-Gm-Message-State: AGi0PuY6H/7La4qVV6EGeMsOUeehjNSw2gKMspjGvNxkZO6s5BERpwFk wa6dZggPbzW9AAUCPIxhZ58= X-Google-Smtp-Source: APiQypJR73hwmm8jLWhexLWoxvGri8Q3HFPBC6DXFNQCtWWPT+na+ygm3dUw9LicgcH16c8bKYtZyA== 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: 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 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