Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4857220pxb; Thu, 14 Oct 2021 13:25:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+HyXBfUdLzdA20AjDq40ZFP5haQWy3g41RfjIbRqQzuY8Fc0ptEeeCiYLDVRZ/UMoxdmi X-Received: by 2002:a17:902:c409:b0:13f:1a43:c5c with SMTP id k9-20020a170902c40900b0013f1a430c5cmr7018888plk.40.1634243159657; Thu, 14 Oct 2021 13:25:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634243159; cv=none; d=google.com; s=arc-20160816; b=ubeCSbpn6XwE69R2otG2kTOZH3/dIBfEDTfzOzbavCGEFMgwEfVYTBIzK5FC41Wl7b cNbvya/WgAr9bKqm3FhCJQlvHdFAXg6YcU9ZNlIFjGhNvXDQerHQnCt1cfveymmCbp68 XVIyx2eFsK0P3MlqiJJzZzLSZyHbD7UE9kyLvGz+UcgGd4Tbpo3XYWIrq59pUqa0ZxsK rbqBCZ2J8Jti+tDdOdxWi5uEH0qHrJrPD9ljAAhDGriDhm2V4djLU5cqZ+1FlnQ4+T/t wgg03Y6ghStFjFiyu0jxNarHFynqPZuq/Xx8K0TeWsbohkAjVDiT7KbXejoakTasMusc xmFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=yEsEtocmA/7tqkQKeziK3eedh4hAIlcY+2qkVb6Er6M=; b=azEfwQL3XMWf8ZjiH/BiKqwU4cDv9KcOSygAXJ35D/LyR9clhmRCt7hQ1iZpIw5bH6 9MHOMRjF56VNaQMhhlKqKQVqHU4BZ4XYIN0y0Srtbm91kBrFnnbNHdrr6qO3X5Uu/YJ4 ohbPqqbLdPydF7OuXaMjaXdBBU2U7/Dd6XhBOz0vdsFNN9KXqqM7IdE9NqQ8Tpj9dcNc 1nJLsw2/TuAr8qR6BZ7v0cNa2bqfoO4FPg17j4/JsQvBgbVQhmN/35dxmSDNLipQPOky EzEDfy0jEbOpv8pyxZllNJG1pe+xI/6rzOw4jY3qJ/dGLoRplEgm/CKf16QETKKJQYaJ rxWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=vg18iST+; dkim=neutral (no key) header.i=@suse.cz; 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 s197si5259303pfc.152.2021.10.14.13.25.46; Thu, 14 Oct 2021 13:25:59 -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; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=vg18iST+; dkim=neutral (no key) header.i=@suse.cz; 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 S231847AbhJNPnY (ORCPT + 99 others); Thu, 14 Oct 2021 11:43:24 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:51374 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230523AbhJNPnY (ORCPT ); Thu, 14 Oct 2021 11:43:24 -0400 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-out1.suse.de (Postfix) with ESMTPS id 7BBC22197B; Thu, 14 Oct 2021 15:41:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1634226078; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yEsEtocmA/7tqkQKeziK3eedh4hAIlcY+2qkVb6Er6M=; b=vg18iST+sUHwjVOhDlwp6jEiqeTTr1OBUH1Kv/ORi9IVNBzewLXEIcKyGboshj82p4+XoF KkacC/Bsj8pscxTnwLwX/pov5s+dGOjPzw/NkyujkqQXiuAD/icRMrwVhggebRC4IEECD3 5ldzJw/mgGSfLx9XcXix2HgRIXVGyQk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1634226078; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yEsEtocmA/7tqkQKeziK3eedh4hAIlcY+2qkVb6Er6M=; b=eT8brfy1cCD8SiYsNBf3zG9lXyuWpUvLPlR2rztiaz2dQo7J/qfW6yhosEDdQfuAKW+fRa tZl2x/IFIV0B/BCA== 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 4AB9E13D9F; Thu, 14 Oct 2021 15:41:18 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 1H6LEZ5PaGHlIAAAMHmgww (envelope-from ); Thu, 14 Oct 2021 15:41:18 +0000 Message-ID: Date: Thu, 14 Oct 2021 17:41:17 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH 8/8] mm/vmscan: Delay waking of tasks throttled on NOPROGRESS Content-Language: en-US To: Mel Gorman , Linux-MM Cc: NeilBrown , Theodore Ts'o , Andreas Dilger , "Darrick J . Wong" , Matthew Wilcox , Michal Hocko , Dave Chinner , Rik van Riel , Johannes Weiner , Jonathan Corbet , Linux-fsdevel , LKML References: <20211008135332.19567-1-mgorman@techsingularity.net> <20211008135332.19567-9-mgorman@techsingularity.net> From: Vlastimil Babka In-Reply-To: <20211008135332.19567-9-mgorman@techsingularity.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/8/21 15:53, Mel Gorman wrote: > Tracing indicates that tasks throttled on NOPROGRESS are woken > prematurely resulting in occasional massive spikes in direct > reclaim activity. This patch wakes tasks throttled on NOPROGRESS > if reclaim efficiency is at least 12%. > > Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka > --- > mm/vmscan.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/mm/vmscan.c b/mm/vmscan.c > index 7b54fec4072c..80a9a26f701f 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -3338,8 +3338,11 @@ static inline bool compaction_ready(struct zone *zone, struct scan_control *sc) > > static void consider_reclaim_throttle(pg_data_t *pgdat, struct scan_control *sc) > { > - /* If reclaim is making progress, wake any throttled tasks. */ > - if (sc->nr_reclaimed) { > + /* > + * If reclaim is making progress greater than 12% efficiency then > + * wake all the NOPROGRESS throttled tasks. > + */ > + if (sc->nr_reclaimed > (sc->nr_scanned >> 3)) { > wait_queue_head_t *wqh; > > wqh = &pgdat->reclaim_wait[VMSCAN_THROTTLE_NOPROGRESS]; >