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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 479BDC4332F for ; Fri, 26 Nov 2021 16:52:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4506A6B0075; Fri, 26 Nov 2021 11:52:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3FDDA6B0078; Fri, 26 Nov 2021 11:52:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2EBDF6B007B; Fri, 26 Nov 2021 11:52:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0037.hostedemail.com [216.40.44.37]) by kanga.kvack.org (Postfix) with ESMTP id 1F5A36B0075 for ; Fri, 26 Nov 2021 11:52:26 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id DD5548248D52 for ; Fri, 26 Nov 2021 16:52:15 +0000 (UTC) X-FDA: 78851674230.06.1D85CF4 Received: from outbound-smtp24.blacknight.com (outbound-smtp24.blacknight.com [81.17.249.192]) by imf28.hostedemail.com (Postfix) with ESMTP id 133EF90000B1 for ; Fri, 26 Nov 2021 16:52:14 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail04.blacknight.ie [81.17.254.17]) by outbound-smtp24.blacknight.com (Postfix) with ESMTPS id 7DE6FC16E6 for ; Fri, 26 Nov 2021 16:52:13 +0000 (GMT) Received: (qmail 10917 invoked from network); 26 Nov 2021 16:52:13 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.17.29]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 26 Nov 2021 16:52:13 -0000 Date: Fri, 26 Nov 2021 16:52:11 +0000 From: Mel Gorman To: Alexey Avramov Cc: Andrew Morton , Michal Hocko , Vlastimil Babka , Rik van Riel , Mike Galbraith , Darrick Wong , regressions@lists.linux.dev, Linux-fsdevel , Linux-MM , LKML Subject: Re: [PATCH 1/1] mm: vmscan: Reduce throttling due to a failure to make progress Message-ID: <20211126165211.GL3366@techsingularity.net> References: <20211125151853.8540-1-mgorman@techsingularity.net> <20211127011246.7a8ac7b8@mail.inbox.lv> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20211127011246.7a8ac7b8@mail.inbox.lv> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 133EF90000B1 X-Stat-Signature: maatfb4msjwdi16a9yoo8oqo76j5cjsk Authentication-Results: imf28.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf28.hostedemail.com: domain of mgorman@techsingularity.net designates 81.17.249.192 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-HE-Tag: 1637945534-739083 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 Sat, Nov 27, 2021 at 01:12:46AM +0900, Alexey Avramov wrote: > >After the patch, the test gets killed after roughly 15 seconds which is > >the same length of time taken in 5.15. > > In my tests, the 5.15 still performs much better. > How much better? > New question: is timeout=1 has sense? Will it save CPU? It's the minimum stall time available -- it's 1 tick so the exact stall time depends on HZ and yes, it's to stall to wait for something to happen. It'll get woken early if another reclaimer makes forward progress. This patch on top will stall less. I sent it already but it may not be clear that I meant it to be applied on top of this patch. diff --git a/mm/vmscan.c b/mm/vmscan.c index 176ddd28df21..167ea4f324a8 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -3404,8 +3404,8 @@ static void consider_reclaim_throttle(pg_data_t *pgdat, struct scan_control *sc) if (current_is_kswapd()) return; - /* Throttle if making no progress at high prioities. */ - if (sc->priority < DEF_PRIORITY - 2 && !sc->nr_reclaimed) + /* Throttle if making no progress at high priority. */ + if (sc->priority == 1 && !sc->nr_reclaimed) reclaim_throttle(pgdat, VMSCAN_THROTTLE_NOPROGRESS); } -- Mel Gorman SUSE Labs