Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp9680024rwl; Wed, 11 Jan 2023 08:36:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXvWZDGTWYngfXxcpGENKnFLNW/jRsFzRLYffaltfezMJN+NRtvVPRz+HR7WxviWv+LpYzjh X-Received: by 2002:a05:6a20:13a6:b0:af:9c75:6699 with SMTP id w38-20020a056a2013a600b000af9c756699mr118342452pzh.1.1673454997799; Wed, 11 Jan 2023 08:36:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673454997; cv=none; d=google.com; s=arc-20160816; b=RKqKC/EjCe7vhzaCVcdn+jKv5HZhW/TC5rRDdLoijO6q8fxLO6+5GFyoqUx0Pw0r5F lO7UbogrCfpbUcsf0Wo2Eey/71aNKnUQVWxLMHAAfQ4H4cC+mU+27nBsw64dO3ivdILs OVE3/vNSAwv2abfcntdpOn4XdYBUuNeJ3UlZIvdgCAgTYnZ80MhbcypeHtYK5T9nYvN0 eZPJJX+b6zaIKzeIMTvJnXvumT91cd6eF3AJU7qXgBWJ86iMUg49w4MbBmHAdxO5xZnw 3L1S9Z/KvRgOcpqW4TsdjvykN0nWxSyBFNt1Z7wshLSp/5vEOiJc3ODx5sXJtkX+wyc2 XgRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=eGle1qDaVLgCmc/KzANyHq27FrunNJVqz61yvg3H7TM=; b=ox/NAgfjqBWm3v0vQ1qqIFl95CTDCnPRtqkn76KL1Z7IzLpjduhwDLJ7uJzpFG0Xs1 2PoGZ982tcMm70WV7u5q64jhbFDOhq17QwPW6Dv8M0weL1/Qu0SaYDQIbgRs9qDItZy/ zcgGGDKz/yth5E+kuJi2lOlc2wNcA5/wxgb+zm1CXROdIAZEMh0smiZCdutBae3c/4Ny XCxVRa+PYx2vlvJB/T2QfmYYuTMk5K6ziOBxuR4SjwrNCB8LwTpA/CfWNURjoI+ZJwrF Km63TVsWp1sK7tKAdpZ3jlxpxZ4OQT0sTHxLgrR7irZQ0/1P1RL5PfGACmRkZBqPquk3 ir/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=ezLduFnd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o10-20020a63f14a000000b0046b121a3246si15552402pgk.842.2023.01.11.08.36.31; Wed, 11 Jan 2023 08:36:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=ezLduFnd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235186AbjAKPs5 (ORCPT + 51 others); Wed, 11 Jan 2023 10:48:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238770AbjAKPsZ (ORCPT ); Wed, 11 Jan 2023 10:48:25 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A06BA33D67 for ; Wed, 11 Jan 2023 07:46:16 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id BA3006017A; Wed, 11 Jan 2023 15:46:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1673451974; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=eGle1qDaVLgCmc/KzANyHq27FrunNJVqz61yvg3H7TM=; b=ezLduFndFN+PyJnkiyV0RCMWop/miUrrWZlSQSn9lbKQ7RPAZcw3SikHtm1D3clqUPSFtV XNEmVWAQCgQ1UhW66B5NYVglF35FSjWgyFptyR2WQNEyzkKEHfFyBwT4vWVQgCTnRBhIBC JnbQz1+NiRifLjPFyJVvWFrnTjLbMMU= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 9B57E1358A; Wed, 11 Jan 2023 15:46:14 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 6CiJI8bZvmNDPQAAMHmgww (envelope-from ); Wed, 11 Jan 2023 15:46:14 +0000 Date: Wed, 11 Jan 2023 16:46:13 +0100 From: Michal Hocko To: Mel Gorman Cc: Linux-MM , Andrew Morton , NeilBrown , Thierry Reding , Matthew Wilcox , Vlastimil Babka , LKML Subject: Re: [PATCH 5/7] mm/page_alloc.c: Allow __GFP_NOFAIL requests deeper access to reserves Message-ID: References: <20230109151631.24923-1-mgorman@techsingularity.net> <20230109151631.24923-6-mgorman@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230109151631.24923-6-mgorman@techsingularity.net> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 09-01-23 15:16:29, Mel Gorman wrote: > Currently __GFP_NOFAIL allocations without any other flags can access 25% > of the reserves but these requests imply that the system cannot make forward > progress until the allocation succeeds. Allow __GFP_NOFAIL access to 75% > of the min reserve. I am not sure this is really needed. IIRC the original motivation for allowing NOFAIL request to access access to memory reserves was GFP_NOFS|__GFP_NOFAIL requests which do not invoke the OOM killer. The amount of memory reserves granted was not really important. The point was to allow to move forward. Giving more of the reserves is a double edge sword. It can help in some cases but it can also prevent other high priority users from fwd progress. I would much rahter see such a change with an example where it really made a difference. > Signed-off-by: Mel Gorman > --- > mm/page_alloc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 6f41b84a97ac..d2df78f5baa2 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -5308,7 +5308,7 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order, > * could deplete whole memory reserves which would just make > * the situation worse > */ > - page = __alloc_pages_cpuset_fallback(gfp_mask, order, ALLOC_HARDER, ac); > + page = __alloc_pages_cpuset_fallback(gfp_mask, order, ALLOC_MIN_RESERVE|ALLOC_HARDER, ac); > if (page) > goto got_pg; > > -- > 2.35.3 -- Michal Hocko SUSE Labs