Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2236576ybz; Thu, 30 Apr 2020 13:23:07 -0700 (PDT) X-Google-Smtp-Source: APiQypJ/2bWkg+TkA0J0NIjr6WMVWQhoaw5QbuGp/1spvBDiM0161RDbKgu2W+t5LupFrPc5jp37 X-Received: by 2002:a50:ef18:: with SMTP id m24mr713666eds.281.1588278187774; Thu, 30 Apr 2020 13:23:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588278187; cv=none; d=google.com; s=arc-20160816; b=oQHiWp6s1wXdOZbG9pcZvGcGr+6p/YvlgKqbT4+LK69wM0MFaIHcurmrCmYbFoh5Xt 3J17tPwsYaTo3rOISb1ck8EFTmQgh6xRRbSvuGjnNq0rOSm4Gtta+2iN/M/d/NILnm98 /ivk+aZcJDW8o9mo65AE6bE5WqU62VWIuTJ3ccgG51PBduDJIR5Bu9x223IvgMK/lpoI cQySuanWFL63q2y1hdM5D65nKyOo7O/Cb5hldQlMtBc8wmjAB/U/uwbPVDzUEX8D5tQg 2g9IHjhZPfM4L8LjrtJoWrMIAPvjCvzh2MxNFIolHc5HLNOQOOlYkTcnCd8ceSlpROjz Pnpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=guKhKwrXEiDwgQzNFnO6v/2/mR5PiCzsUtQ3eT/ji4A=; b=chEiN/v1US4FJFSWZhycCa06gKdpgqWrkNqo+EDxb8wN/T00qPATirsrnFwGpzUAeG Z9YrZV47OCZlhi9OXHIcP5PjWjFvz6LsFoCnJ/xAKf1xfmPXw++AnYlQUUCQLL7e1osS zSQDD4DWKWKy4gWKn4ufGt5a33t5nVTpPPqNEKkXV0HH63KwnHzReNGhUZggdEALE/lo GMas11Iez3akDJwxRPHURnugIemPVuVTQXytOvK1pDQRU3AaYEfK9LEMj1vjCBVQpIU3 G0FWF0axZgpRP/rr3R+fL5+LYHPXSwzR7wbRHGtZAMEx71I6H4HAcBG+wloRarDMsvQ3 Be+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=gcaVyYdy; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qn23si464879ejb.111.2020.04.30.13.22.43; Thu, 30 Apr 2020 13:23:07 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=gcaVyYdy; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726917AbgD3UUZ (ORCPT + 99 others); Thu, 30 Apr 2020 16:20:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726338AbgD3UUY (ORCPT ); Thu, 30 Apr 2020 16:20:24 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21C64C035494 for ; Thu, 30 Apr 2020 13:20:24 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id h4so683048ljg.12 for ; Thu, 30 Apr 2020 13:20:24 -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=P4TDXdQjKu4sfcr7/8UPu8z2bysppVEFXP2lynD5XRA+b2/hJOaXHBe4/aK/bprjte j9+cOvVurNUK7DCsacWA1IazAbtEeoWcFCeXM8nOrWn+6/UblEX8WoHvOv8YC4b4bXku OjpK4LOmERRq3u+V7tUcWwjhhiPvo17fKIpTWpjBMjsMNKC335ptMWWrhT53SdwILPpT kHMZNY8JCAP3gUyf2XHTxr6EJAgfbA4nDhMiNq67JovlLk3pzdK2zkPaP4o5LwKRJDqy 6qRze23ajO/G1hPd7F33qUp65mCe+NbdrCbkIF6ECccnEkIyIUhFhg0llvD7uegCmQ9O Ju4w== X-Gm-Message-State: AGi0PuZ9Be/sK4Jjh6mnRk9JHSe9lNuNuhlocU+5CGd2xTS9fkw5E5Mc vmpZsVZKP9p1FJFgy2o3O7TttT8E2d001mLuTjl8ww== 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" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.