Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp994351rwb; Tue, 29 Nov 2022 07:45:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf7BqaSgOqqkU7b/KiTpR4hccvuSKCZR80IVOQkwh7ZLAtVm+zf1vmRbvyj9WOeWSnx23ZGb X-Received: by 2002:a05:6a00:4286:b0:56d:3de3:c525 with SMTP id bx6-20020a056a00428600b0056d3de3c525mr35054497pfb.41.1669736710667; Tue, 29 Nov 2022 07:45:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669736710; cv=none; d=google.com; s=arc-20160816; b=Q0neXlKxC7ZCB1Hd5BhSb895/CMoaddzWVjyLlFAA2qbXGQWyHlJkvMxjaOwTeYksK 3QYW66RCp7rnxCSM97mKkbmVBth7bo6xTAg7LUfjs5nzS0mM78Et5bVwVjAJf2w38kgb mTB7vSqAp4MR4JWyipUjm9f7IndBGAcoWxKxo9ytf126U+niUwBLG+dw29mskPnIbFcB WsHkgoBPe9IPmvBP+M/A8YUC6YCAOQWts/mmAAbaUI89zc5RkgG+kImvTtD0gueThR7w +H+yOvnlgLeQlVfOLtRJf1bvlrZkuXAa1VJLM6wk2pEa5Tjo1J5vOx+GdFX0YIWIKSlD YIXQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=RloEp3DcyqsMnLvnLDoePVyl3xCkiZ6l2wnKdsZO1Gw=; b=i8Zc146+hFKbNpfuQbFzSfXHdGC5gaKmCQwKDj3t0xwC1PfL5eOdoqO6Q3z5yLRNuK 7Nn5KOn8TqL4qD5dO0ftFEPmeVZs7DA1Vq3DBvMEyNenNYrP0gTlVk3tjUxBmR7X1PVh 9XhEwBkdgdB4U1m3TuGCYC05fzIzIOEGQu6OicsLWecirQgH1NEjDfd0MWO7J9POCmA2 0qowemAnyRy0kly1uEphoJhXtLUszuzsR4ST3zil35wZxzjElF/4pnRxdo0DsarIZ0ci bJxadzGM/Rj8vrX327AdlTntDt8fvmkLcfMtrjMc49LmBmuRRXs2Zq2oqN4db6i+iS6r uIng== 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 76-20020a62154f000000b0056b86567ce9si13058482pfv.347.2022.11.29.07.44.59; Tue, 29 Nov 2022 07:45:10 -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 S235678AbiK2PR4 (ORCPT + 84 others); Tue, 29 Nov 2022 10:17:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235201AbiK2PRq (ORCPT ); Tue, 29 Nov 2022 10:17:46 -0500 Received: from outbound-smtp05.blacknight.com (outbound-smtp05.blacknight.com [81.17.249.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C77DC2653 for ; Tue, 29 Nov 2022 07:17:35 -0800 (PST) Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp05.blacknight.com (Postfix) with ESMTPS id 38057CCB8B for ; Tue, 29 Nov 2022 15:17:34 +0000 (GMT) Received: (qmail 4272 invoked from network); 29 Nov 2022 15:17:34 -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:33 -0000 From: Mel Gorman To: Linux-MM Cc: Andrew Morton , Michal Hocko , NeilBrown , Thierry Reding , Matthew Wilcox , Vlastimil Babka , LKML , Mel Gorman Subject: [PATCH 2/6] mm/page_alloc: Treat RT tasks similar to GFP_HIGH Date: Tue, 29 Nov 2022 15:16:57 +0000 Message-Id: <20221129151701.23261-3-mgorman@techsingularity.net> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20221129151701.23261-1-mgorman@techsingularity.net> References: <20221129151701.23261-1-mgorman@techsingularity.net> 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 RT tasks are allowed to dip below the min reserve but ALLOC_HARDER is typically combined with ALLOC_MIN_RESERVE so RT tasks are a little unusual. While there is some justification for allowing RT tasks access to memory reserves, there is a strong chance that a RT task that is also under memory pressure is at risk of missing deadlines anyway. Relax how much reserves an RT task can access by treating it the same as __GFP_HIGH allocations. 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 3b37909617bc..da746e9eb2cf 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -4852,7 +4852,7 @@ gfp_to_alloc_flags(gfp_t gfp_mask) */ alloc_flags &= ~ALLOC_CPUSET; } else if (unlikely(rt_task(current)) && in_task()) - alloc_flags |= ALLOC_HARDER; + alloc_flags |= ALLOC_MIN_RESERVE; alloc_flags = gfp_to_alloc_flags_cma(gfp_mask, alloc_flags); -- 2.35.3