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.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 5C6DDC433E0 for ; Wed, 24 Feb 2021 20:38:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8341764E7A for ; Wed, 24 Feb 2021 20:38:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8341764E7A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cmpxchg.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id BDC096B0005; Wed, 24 Feb 2021 15:38:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B64EE6B0006; Wed, 24 Feb 2021 15:38:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A05246B006C; Wed, 24 Feb 2021 15:38:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0157.hostedemail.com [216.40.44.157]) by kanga.kvack.org (Postfix) with ESMTP id 8644F6B0005 for ; Wed, 24 Feb 2021 15:38:08 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 45FEE818FC18 for ; Wed, 24 Feb 2021 20:38:08 +0000 (UTC) X-FDA: 77854323456.18.8CBDA63 Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) by imf23.hostedemail.com (Postfix) with ESMTP id 5C3B4A000500 for ; Wed, 24 Feb 2021 20:38:07 +0000 (UTC) Received: by mail-qk1-f179.google.com with SMTP id z190so3555985qka.9 for ; Wed, 24 Feb 2021 12:38:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=k+Ml1eYPwjOONJLtwcZvZvyigCe2sKPobwXhkk2LCr8=; b=o683AocjgiZ8dTsfbgOPsZ0aNJ93D7mHTzh53sWfdoei5j0GUCUom8CTWS2haEcrTz Etc0lxlpqsu/wejXMugE69CVKPANUh9/hPseekOUrWhEMhp+HxppQ7M5KMfPNpi+8uv6 Pz2E9Ft44GezYCi1smMUl2sf/q2/uIT6JFHyb6POyQmgE90TJJO+qvx9OvOLjRQKQrPP 98KVonZFM0YhzjL/p4lSzkDV2hP53C4rZNzuKz6HucLSusO72qjeKVfWwXEzBL94NV7/ wCsvay/o2YDZeBYyR/5tRu7x7EKdsyXlFM45IJLzvzrmNl71lG8xorzEwLULc3Ys92bd 6NaQ== 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=k+Ml1eYPwjOONJLtwcZvZvyigCe2sKPobwXhkk2LCr8=; b=bzf60evYmHdsK1Bp9/ex5IIOzJyurq6v582hlTdpzk1PEcvBeawJI2AB3CNYdgGuDv JMxczZNwUaiRGDR5o6V5Bd1TsLW1uoNrgbQR+k+42qMSIcsEANfQssTppk2/d4zefAq9 WeAQopjbi7lgncGYvbNMla78t1FSDNIl+qTTnXvg7Gg6keqgeq8a2ibgA/tZecxiKGMb wS6Bi134kwwESmYC5h5foCqQUTxNpq5nBAfQ6qjHc55Pb2LG98dfHSf5lVe9V9rJbu+I Es9nqfKaVbTe8jZHXn6zS7kxuebt5ioBknMAoM3nEqSkdWZeJZHjRkirpm7wvPPj22Am MMPQ== X-Gm-Message-State: AOAM5315wiRzyYOzsnIUsWKCOxYTWmABhbrIf6r+ucTWLE10QxDIsX1A O9NPoN77A+3JvH/uxVqab1q4yw== X-Google-Smtp-Source: ABdhPJxE7Kk7WVegfW0dA3yem37nnEyNTOTba6gF7TKuZQhgqeiPc6vBrRVVN2Z1PlsTot+hhmq9cA== X-Received: by 2002:ae9:e50c:: with SMTP id w12mr32981266qkf.42.1614199086632; Wed, 24 Feb 2021 12:38:06 -0800 (PST) Received: from localhost (70.44.39.90.res-cmts.bus.ptd.net. [70.44.39.90]) by smtp.gmail.com with ESMTPSA id j20sm2399834qtl.36.2021.02.24.12.38.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Feb 2021 12:38:06 -0800 (PST) Date: Wed, 24 Feb 2021 15:38:05 -0500 From: Johannes Weiner To: Shakeel Butt Cc: David Rientjes , 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 Message-ID: References: <20210223204337.2785120-1-shakeelb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210223204337.2785120-1-shakeelb@google.com> X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 5C3B4A000500 X-Stat-Signature: 6swei8rjmcco5oyyaa9puqj4giwfcwr1 Received-SPF: none (cmpxchg.org>: No applicable sender policy available) receiver=imf23; identity=mailfrom; envelope-from=""; helo=mail-qk1-f179.google.com; client-ip=209.85.222.179 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614199087-363215 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, Feb 23, 2021 at 12:43:37PM -0800, 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: Johannes Weiner