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=-18.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=ham 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 A72B7C433E0 for ; Thu, 25 Feb 2021 21:36:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1C7A564ECE for ; Thu, 25 Feb 2021 21:36:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1C7A564ECE 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 57FB56B0005; Thu, 25 Feb 2021 16:36:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 530196B0006; Thu, 25 Feb 2021 16:36:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 46CF76B006C; Thu, 25 Feb 2021 16:36:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0024.hostedemail.com [216.40.44.24]) by kanga.kvack.org (Postfix) with ESMTP id 30B4C6B0005 for ; Thu, 25 Feb 2021 16:36:10 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id E20901840B38A for ; Thu, 25 Feb 2021 21:36:09 +0000 (UTC) X-FDA: 77858098458.30.644B8B4 Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by imf21.hostedemail.com (Postfix) with ESMTP id F39BEE000118 for ; Thu, 25 Feb 2021 21:36:05 +0000 (UTC) Received: by mail-pj1-f41.google.com with SMTP id u12so4128706pjr.2 for ; Thu, 25 Feb 2021 13:36:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=/U0ItIv10awr48o0Xr67ORIR0R4cpmrKcS939Ry0u60=; b=aM51O6VgHioWd7XkWW6peAD4fP73FQxRl9onjbsDlp5Blv8GVDlbHlQ+bVRRjiux/q VIxiQcJR41IkzBS8pG7heU8OynV6hjepxqvlstpyFvUkQWJhAnBl+a6tpRtBk+ZyE13j zVdDJdwPN3PqFz/Ss1XlFCxH4TSZowvWFTJivJL+xB/l89cEcHmp/rYKIVkSu4LT8hga 5nSYNt+3RUeWL1/NWf0uHLE+a5HhUal3ERbcabQPkwbKuVJfkwuRGqyfFarm3LfwfI8M Mj5tmQZmj/xixxD5TIyQNEkHBfKvZEGwiP/SS9Cz6oyw1sHAzZLiS2+UfBZj5WuIOQA8 iO3Q== 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:in-reply-to:message-id :references:mime-version; bh=/U0ItIv10awr48o0Xr67ORIR0R4cpmrKcS939Ry0u60=; b=THe1EKCAMA+bZcY3a+T30iWLCmwTxe5Okqv0uV5sEVd5pNPtIm+5MVXBp4F1z5gYvn Hlr0UaaHFhrBs61Rvt9TK7r+Iptj3VWzoC8xZgGPctYezcG5P5X2AgW/f53y4aOTRvsm /3yeWcJOnwMaT/hdb/ulGz75Fg0cuolt6jTLd5jiQinFwwIowLFcuAgjDnMcDia5w7r/ U6Hw66/YyR7afMdG+hly7BUAsbM3sDIiseQTIeVeJgUvbPSs5SmSugzU6QE5OqoGr6L3 aM1Mt7OGYvwiaVI30GQeFd5XLrnjJi/SnNQ3knHtGHmk0U7nJiExaASPknxEv++I62nI W5vg== X-Gm-Message-State: AOAM532PCISdUaj4Q4/bJgkL4CX0DPVBX0fDvWSV7F2fNockvIok6b7D 76t3RR6NzWqe5zNGm4Kt8WRFhg== X-Google-Smtp-Source: ABdhPJx9m++KLr1Vney+yZ57/jgY0SoHkKVpS8hWdbbOKP+8KR9VogqbH4ylR1ahD/dOaJ4IAJ2uqQ== X-Received: by 2002:a17:90a:4a06:: with SMTP id e6mr362628pjh.141.1614288968138; Thu, 25 Feb 2021 13:36:08 -0800 (PST) Received: from [2620:15c:17:3:a902:4bab:58a0:3f05] ([2620:15c:17:3:a902:4bab:58a0:3f05]) by smtp.gmail.com with ESMTPSA id 142sm600208pfz.196.2021.02.25.13.36.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Feb 2021 13:36:07 -0800 (PST) Date: Thu, 25 Feb 2021 13:36:06 -0800 (PST) From: David Rientjes To: Shakeel Butt cc: Johannes Weiner , Roman Gushchin , Michal Hocko , Andrew Morton , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] memcg: enable memcg oom-kill for __GFP_NOFAIL In-Reply-To: <20210223204337.2785120-1-shakeelb@google.com> Message-ID: References: <20210223204337.2785120-1-shakeelb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Stat-Signature: ypyx8xgb5upiinjqmxp9ore99ui4767c X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: F39BEE000118 Received-SPF: none (google.com>: No applicable sender policy available) receiver=imf21; identity=mailfrom; envelope-from=""; helo=mail-pj1-f41.google.com; client-ip=209.85.216.41 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614288965-84114 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 Tue, 23 Feb 2021, Shakeel Butt wrote: > In the era of async memcg oom-killer, the commit a0d8b00a3381 ("mm: > memcg: do not declare OOM from __GFP_NOFAIL allocations") added the code > to skip memcg oom-killer for __GFP_NOFAIL allocations. The reason was > that the __GFP_NOFAIL callers will not enter aync oom synchronization > path and will keep the task marked as in memcg oom. At that time the > tasks marked in memcg oom can bypass the memcg limits and the oom > synchronization would have happened later in the later userspace > triggered page fault. Thus letting the task marked as under memcg oom > bypass the memcg limit for arbitrary time. > > With the synchronous memcg oom-killer (commit 29ef680ae7c21 ("memcg, > oom: move out_of_memory back to the charge path")) and not letting the > task marked under memcg oom to bypass the memcg limits (commit > 1f14c1ac19aa4 ("mm: memcg: do not allow task about to OOM kill to bypass > the limit")), we can again allow __GFP_NOFAIL allocations to trigger > memcg oom-kill. This will make memcg oom behavior closer to page > allocator oom behavior. > > Signed-off-by: Shakeel Butt Acked-by: David Rientjes