Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1827402pxb; Mon, 20 Sep 2021 06:18:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmLfJqlIvqjN6j6XjUYHJWGfCM5YMkEnQhc3n7XgApGf4ZjhQPfJLp9WXTFXj9/ORnoFhK X-Received: by 2002:a17:906:1b08:: with SMTP id o8mr28729697ejg.21.1632143922502; Mon, 20 Sep 2021 06:18:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632143922; cv=none; d=google.com; s=arc-20160816; b=RomiyWyawaicJ8bgonuGt04EOyNB76g5twxOmIIZkXCvPRX/X8O3Z8Zr7pWakqLH4r KwWtqogAWSbHaSgpedN1tWLvKMgfZaxQfQT0ji3kKY3xBK24Q7Rd2lxYAljDbF8e0WVK 7NcOBCZR+wQ3EI1FkHQO3/D2cqtvP8V2ivYLGY7a0ShmN+HZA3V7DBkQYH7a/0AA1jCI mw2zHfMMJsrpXRf0qJqIEAz2ZCwrm0efxTnTgNn8aZNCIDCwzQJW6vLSGqKYK2Fgli2y WtRx7LkK/IeH+au4Wtzh5AE/mJ/JHL/Ww0IiqknjWobB2KyL40tdEC/0AI+KFFB8GtLC YotA== 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=HpiJk6DxzbC1o+VZA0pwju2L2kvMCw3qK1VwL6TgAQk=; b=qkCltSaHV3wLYJRCMngG4jzp5Dq+x6ikbNhlkNh2dDKavTepgC4CjNDU5iJe/gTrQE HWpT5UWrQQO2E/+t2g2T45szqsf85VzeMDjxqMQlxJ7gmFl085ap1UwBv606LrW81uHd oSIuZZ8yiKr5ulJ33fIl3ZAwNKZAcfZOTuSjgG+WOLngr8Dl103T8QdVdu17QzhKgO8B qkfUXCAZJVHK0cz9N/qbjOcIiM7/g5Y2R7uUOLNJTNC6jO6PElPE3s6h8cSuFEUoSkZ6 LcQJGzvuGmFrq5ktJAeI6XocuoRMtEgk1WqT/jCbl42qlXgW1dEWhZBdPNK5nEF3fPBZ BzUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p6si16734279edy.476.2021.09.20.06.18.15; Mon, 20 Sep 2021 06:18:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236105AbhITI5Q (ORCPT + 99 others); Mon, 20 Sep 2021 04:57:16 -0400 Received: from outbound-smtp29.blacknight.com ([81.17.249.32]:58504 "EHLO outbound-smtp29.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236166AbhITI5K (ORCPT ); Mon, 20 Sep 2021 04:57:10 -0400 Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp29.blacknight.com (Postfix) with ESMTPS id D2073BEF65 for ; Mon, 20 Sep 2021 09:55:41 +0100 (IST) Received: (qmail 29275 invoked from network); 20 Sep 2021 08:55:41 -0000 Received: from unknown (HELO stampy.112glenside.lan) (mgorman@techsingularity.net@[84.203.17.29]) by 81.17.254.9 with ESMTPA; 20 Sep 2021 08:55:41 -0000 From: Mel Gorman To: Linux-MM Cc: NeilBrown , Theodore Ts'o , Andreas Dilger , "Darrick J . Wong" , Matthew Wilcox , Michal Hocko , Dave Chinner , Rik van Riel , Vlastimil Babka , Johannes Weiner , Jonathan Corbet , Linux-fsdevel , LKML , Mel Gorman Subject: [PATCH 5/5] mm/page_alloc: Remove the throttling logic from the page allocator Date: Mon, 20 Sep 2021 09:54:36 +0100 Message-Id: <20210920085436.20939-6-mgorman@techsingularity.net> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210920085436.20939-1-mgorman@techsingularity.net> References: <20210920085436.20939-1-mgorman@techsingularity.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The page allocator stalls based on the number of pages that are waiting for writeback to start but this should now be redundant. shrink_inactive_list() will wake flusher threads if the LRU tail are unqueued dirty pages so the flusher should be active. If it fails to make progress due to pages under writeback not being completed quickly then it should stall on VMSCAN_THROTTLE_WRITEBACK. Signed-off-by: Mel Gorman --- mm/page_alloc.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 78e538067651..8fa0109ff417 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -4795,30 +4795,11 @@ should_reclaim_retry(gfp_t gfp_mask, unsigned order, trace_reclaim_retry_zone(z, order, reclaimable, available, min_wmark, *no_progress_loops, wmark); if (wmark) { - /* - * If we didn't make any progress and have a lot of - * dirty + writeback pages then we should wait for - * an IO to complete to slow down the reclaim and - * prevent from pre mature OOM - */ - if (!did_some_progress) { - unsigned long write_pending; - - write_pending = zone_page_state_snapshot(zone, - NR_ZONE_WRITE_PENDING); - - if (2 * write_pending > reclaimable) { - congestion_wait(BLK_RW_ASYNC, HZ/10); - return true; - } - } - ret = true; - goto out; + break; } } -out: /* * Memory allocation/reclaim might be called from a WQ context and the * current implementation of the WQ concurrency control doesn't -- 2.31.1