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=-8.3 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL 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 A369DC4724C for ; Thu, 30 Apr 2020 20:20:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 652AC2076D for ; Thu, 30 Apr 2020 20:20:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="gcaVyYdy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 652AC2076D Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 138248E0005; Thu, 30 Apr 2020 16:20:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0C2CC8E0001; Thu, 30 Apr 2020 16:20:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ECCE48E0005; Thu, 30 Apr 2020 16:20:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0241.hostedemail.com [216.40.44.241]) by kanga.kvack.org (Postfix) with ESMTP id D0CCF8E0001 for ; Thu, 30 Apr 2020 16:20:24 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 904413CE9 for ; Thu, 30 Apr 2020 20:20:24 +0000 (UTC) X-FDA: 76765638768.29.comb56_385e69533337 X-HE-Tag: comb56_385e69533337 X-Filterd-Recvd-Size: 4091 Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by imf50.hostedemail.com (Postfix) with ESMTP for ; Thu, 30 Apr 2020 20:20:24 +0000 (UTC) Received: by mail-lj1-f193.google.com with SMTP id g4so748986ljl.2 for ; Thu, 30 Apr 2020 13:20:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=guKhKwrXEiDwgQzNFnO6v/2/mR5PiCzsUtQ3eT/ji4A=; b=gcaVyYdy32+4klv0m7W2u51o7lyTPuxVavEx8YwwdS2ENTcJOhovS0+Av7iXHFQVaW 0DkmLQyPVheQfV0yVq4/ZjJ45Sm4cgzctg6kflk4xvDPRrCz9H4ctmEhZ7rU/ru60hBr 5GNSJ3glyv1H/QAIx+KBjmCRwKhXWNzFHz1I5byQDnFd7QYuRsaizyq0/JvpuuF3vJBs sznI+dhDToDpZ8UYWzDkrEUWudNUnX2Au2DdObfHIzf0dkRHz9gnaCDhJiK/f0xcrvQq j69cVNJu7Ta/ldmUGyk+fln1PTh2sTsRPZdyYGbDCCdEisLWPib9t2fJl2bYdT22T2p4 6sDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=guKhKwrXEiDwgQzNFnO6v/2/mR5PiCzsUtQ3eT/ji4A=; b=UKjqdgWO2hS92XwjgUN8YLQ3e0mMLPG8D6l8Wk23PuMzNM2USCfZ0VddaB3PVe9wsV 4sl2r5F7Qc5/dD6Zh0ckSiwc0Yy10ZqW7p7ucnNSn+4YjkNr8qtuT60K6+wIOFgOVAuJ HFS+UJ1mndXTThOMlofvkH+RUBcMxXlp2zNrW1lq5v7hb8ZAtGo4t0MvDoTMigJPNehy wfG9xlrLy4IyM3OV0jyz/Zl9PrwBOrxINR+SdBI+e4x6UiFrE9kEaqvfOwgR20eaDLje NEKKfKMMy07Jc2U6O2RumgD4R6NWMj6AIjWenjRPvVE3t4RAK/W9Qo/95DiQXoHYJrCw 8aGA== X-Gm-Message-State: AGi0PuY7AocK0BZ2boldnx/75W+asLt8h/fI+oM17whxjuogMK/PffMc 9xzTHvyBmVvL/+/K/xdbuijBY8D/z7eKkAM8bkggFg== X-Google-Smtp-Source: APiQypIN1pXroLJgB0zigxp45+sMYFPb32PYYNnPovYQfEX4qVKgGdnnsiT3h2XmdfDD/SQlJTrtw3sUQJsp6N9FWGI= X-Received: by 2002:a2e:9a4a:: with SMTP id k10mr366782ljj.115.1588278022286; Thu, 30 Apr 2020 13:20:22 -0700 (PDT) MIME-Version: 1.0 References: <20200430182712.237526-1-shakeelb@google.com> <20200430192907.GA2436@cmpxchg.org> In-Reply-To: <20200430192907.GA2436@cmpxchg.org> From: Shakeel Butt Date: Thu, 30 Apr 2020 13:20:10 -0700 Message-ID: Subject: Re: [PATCH] memcg: oom: ignore oom warnings from memory.max To: Johannes Weiner Cc: Roman Gushchin , Michal Hocko , Greg Thelen , Andrew Morton , Linux MM , Cgroups , LKML Content-Type: text/plain; charset="UTF-8" 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, 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.