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.4 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,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 7AFC1C3A5A9 for ; Mon, 4 May 2020 13:55:02 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 37CEC20757 for ; Mon, 4 May 2020 13:55:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="VwcmkO0/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 37CEC20757 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 C05068E0016; Mon, 4 May 2020 09:55:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BB6058E0003; Mon, 4 May 2020 09:55:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ACB408E0016; Mon, 4 May 2020 09:55:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0249.hostedemail.com [216.40.44.249]) by kanga.kvack.org (Postfix) with ESMTP id 96FAE8E0003 for ; Mon, 4 May 2020 09:55:01 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 5F49A12F30 for ; Mon, 4 May 2020 13:55:01 +0000 (UTC) X-FDA: 76779182802.02.hill86_48ec783a69010 X-HE-Tag: hill86_48ec783a69010 X-Filterd-Recvd-Size: 4740 Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by imf12.hostedemail.com (Postfix) with ESMTP for ; Mon, 4 May 2020 13:55:00 +0000 (UTC) Received: by mail-lj1-f193.google.com with SMTP id f18so9696419lja.13 for ; Mon, 04 May 2020 06:55:00 -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=Itdyqr8e224xa0qoeMb+hZq4gtZJw27Kt/U4OO6UwfY=; b=VwcmkO0/GGrS6n5JI5GYBP8kGrKFLTo2xvM2ArBj0wbbTAFiLbviLMWKFElUpB1u6f WgULsIHvmc25XtTe+aJFycilL4dmDvYQXBjgWFAqwh6WcFlGwUP/KZN3Izhl5TPyVYWx G28TYGCkekQgzmA9OTUzT3vDw78RBR1mtkmpHdpljY6SYmnD2iBGW25ClTOYDjONv/DZ 4dAknYrGHYB8MFaPSTGCOfozIdR+Z2EP6rW2LI59ejQ8A8zk69BN9FX540dADpBvZWg4 AHm0elYmxfpvuY5b9nbJ9Bpb+6pyYKLZmUTWEUuMAMpCQzn3eLMnlpgruHUEUJdyhwJ7 kVjw== 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=Itdyqr8e224xa0qoeMb+hZq4gtZJw27Kt/U4OO6UwfY=; b=XxmlMc65wlW7jxLZ2AaJjwbx3vxXjJBjq+GwhyJyXq27BftOA2tAVzJynDvTJ6Ja5H JpHUl4MzTvrMhNSKEN8GDeN4eagjDBt4Yts56eWLnXdBto9M1/LCFJUl0BzeQ9YZJ3GA LF36eL1F6bdmrYwUkohE4XJWybmJXYSeqP0i7zTac+Ovs3I7GANd1p7B0s4SrbpMAEHg 5HKAJHElVHGtRRVdcqZT9ZbjwliIUZfzcs50QUKgTmaoQ6iuHD5EkrmkHZHOcm/BIBND sDCLvKtXeiC0EmW5xgxz8G2KoZif57HDvpDbTliuK7if0k6y/Xd1qNE2wnZWwSyoBwC7 7IOA== X-Gm-Message-State: AGi0PubviQC6uvEO7pge/+FlKJ1WssO0OQbUrlHgs7K+XmjSuUfmb7Wv XR+74FFhQr3C91KyvQwa2R5IyGXVNefEtUa5uAH7iQ== X-Google-Smtp-Source: APiQypKqAKnoOiCs/8EtnTYjFOuEKS1X7ml0nzp5cVcBNdTubHtkdwIUSuo4z/eUhZ7BmF9cZA0K+zzUomm2bREV/nw= X-Received: by 2002:a2e:330f:: with SMTP id d15mr9701206ljc.250.1588600499500; Mon, 04 May 2020 06:54:59 -0700 (PDT) MIME-Version: 1.0 References: <20200430182712.237526-1-shakeelb@google.com> <20200430192907.GA2436@cmpxchg.org> <20200504065701.GB22838@dhcp22.suse.cz> In-Reply-To: <20200504065701.GB22838@dhcp22.suse.cz> From: Shakeel Butt Date: Mon, 4 May 2020 06:54:47 -0700 Message-ID: Subject: Re: [PATCH] memcg: oom: ignore oom warnings from memory.max To: Michal Hocko Cc: Johannes Weiner , Roman Gushchin , 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 Sun, May 3, 2020 at 11:57 PM Michal Hocko wrote: > > 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? > I don't think we should warn for all remote charging on dead memcgs. One particular example is the buffer_head which can be allocated within reclaim context and most probably pages which they are attached to will be freed soon. Shakeel