Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1010020rwb; Tue, 29 Nov 2022 07:58:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf4Qf1i+bLk6aUOJ/fGHI3/JrT2870mK5LUtXwcKkpnTXvx/JJ0YpUo+rWH5wqNsi9tkV3jL X-Received: by 2002:a17:90a:c587:b0:219:1efc:a998 with SMTP id l7-20020a17090ac58700b002191efca998mr16536385pjt.35.1669737483681; Tue, 29 Nov 2022 07:58:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669737483; cv=none; d=google.com; s=arc-20160816; b=Xec/NCBU06iY8FSrbO2AzosyVT1HAIikG50VTplRfpW4Ip8eYmMvhT+8Q9rWS5YPgg z2akOCl/1dg13yKkrGTbAtC1WxgcbSXXo7ewsOW9z+OrdxlPp0C+7Oa7ZQQ0Tro4DrqP x/KiqmUkWWPci22GsrdXsIM9aIgkp70JBhV4Dv7M3zfDQN9kxCepfWNtruwSwXhYaKQ/ HRFzENyeg/In0+OhVQ07U043wCn2eUkNh7R8pvxqKxuDy1i3WLrvMgKBgRtyMWLysVT4 N2oa/7Mmp0s6bCgFuzFcInYcTu92stNGm5wxVdjb09UMtzR7G+VdEtR2N5aOhdL2Ox+D zsjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=6kb2S9W4Z/IrS+hkIoCd4bJSxqDhx0SUP3vaYM0FDlo=; b=zHAJek6jB4ccPn/IJzgQnpj/KXjBC6K70re38MGmcBmgY9KOtb45gaygitu9wlZGLM FrHU1ovRmj2GIFuGO3TdB3pesVIPreCB3IY1GvpdOk2k5qJN/SevR4nhqlRF5Ed+mbZh WvL9cE4E/1dKxPaLQ/3SZRLd/N0CjyPOeKubWf95OUFwZYiNPM7IRdo5UbZN3TvMG/3p fpuBVATosKn1ynuB/ZBAT/UckgvjSKlv1GjtVjMtiQ/BHhBFoYC+3brlr8bvgy5FUDef uLtBnvow8bLAsIoJnO5KZ22dP9+qCnIcF87+NLLidZekwla5ZS0NfEJSGZsquRisBk4c 4eWA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a10-20020a170902ecca00b001709c82ca08si17038508plh.297.2022.11.29.07.57.52; Tue, 29 Nov 2022 07:58:03 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229818AbiK2PRR (ORCPT + 84 others); Tue, 29 Nov 2022 10:17:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234059AbiK2PRQ (ORCPT ); Tue, 29 Nov 2022 10:17:16 -0500 Received: from outbound-smtp51.blacknight.com (outbound-smtp51.blacknight.com [46.22.136.235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D55C245EFD for ; Tue, 29 Nov 2022 07:17:14 -0800 (PST) Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp51.blacknight.com (Postfix) with ESMTPS id 20E72FA9DE for ; Tue, 29 Nov 2022 15:17:13 +0000 (GMT) Received: (qmail 3308 invoked from network); 29 Nov 2022 15:17:12 -0000 Received: from unknown (HELO morpheus.112glenside.lan) (mgorman@techsingularity.net@[84.203.198.246]) by 81.17.254.9 with ESMTPA; 29 Nov 2022 15:17:12 -0000 From: Mel Gorman To: Linux-MM Cc: Andrew Morton , Michal Hocko , NeilBrown , Thierry Reding , Matthew Wilcox , Vlastimil Babka , LKML , Mel Gorman Subject: [RFC PATCH 0/6] Discard __GFP_ATOMIC Date: Tue, 29 Nov 2022 15:16:55 +0000 Message-Id: <20221129151701.23261-1-mgorman@techsingularity.net> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 Neil's patch has been residing in mm-unstable as commit 2fafb4fe8f7a ("mm: discard __GFP_ATOMIC") for a long time and recently brought up again. Most recently, I was worried that __GFP_HIGH allocations could use high-order atomic reserves which is unintentional but there was no response so lets revisit -- this series reworks how min reserves are used, protects highorder reserves and then finishes with Neil's patch with very minor modifications so it fits on top. There was a review discussion on renaming __GFP_DIRECT_RECLAIM to __GFP_ALLOW_BLOCKING but I didn't think it was that big an issue and is ortogonal to the removal of __GFP_ATOMIC. There were some concerns about how the gfp flags affect the min reserves but it never reached a solid conclusion so I made my own attempt. The series tries to iron out some of the details on how reserves are used. ALLOC_HIGH becomes ALLOC_MIN_RESERVE and ALLOC_HARDER becomes ALLOC_NON_BLOCK and documents how the reserves are affected. For example, ALLOC_NON_BLOCK (no direct reclaim) on its own allows 25% of the min reserve. ALLOC_MIN_RESERVE (__GFP_HIGH) allows 50% and both combined allows deeper access again. ALLOC_OOM allows access to 75%. High-order atomic allocations are explicitly handled with the caveat that no __GFP_ATOMIC flag means that any high-order allocation that specifies GFP_HIGH and cannot enter direct reclaim will be treated as if it was GFP_ATOMIC. -- 2.35.3