Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1196645pxb; Thu, 21 Oct 2021 18:08:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWHW1bU+YTQTWcXzgLHkarLPSlKgDPr9xvYrYIWDt3+TdACc9PZvXIKBeDcVk36j/UCr9r X-Received: by 2002:a17:906:5590:: with SMTP id y16mr11136994ejp.286.1634864914882; Thu, 21 Oct 2021 18:08:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634864914; cv=none; d=google.com; s=arc-20160816; b=jpKGGUVc5p1YHZBiEDjZ/4qgvZjNSX6ldCY/CzxB8JEwVJiTzPk3j9bN3TrPRV4tHY 5GOGcfph8meps30Qg6KkZsRv132qGv5vInqy1BezSvMfOVFLOPHOiA4InnWEUIuNt1mP SXa0WnTjzlKgKZz/fS6tjeG/xSaJv7YxnKCZgjRhKzRFwXf/4oHSveq2qmrD0B5g7lUt 4PfElqJzJgaBA6e8g5kYupkBe/3iP7VolD2CjCG6ybFXeXk96Mz37AUr2tuaSPZAKZHN gb02DtZj4pbL1xlSI0HvPgcUvtmF/LSOguu5yYwiwSiaxiVkJ8iaRdoswuaeUMYqumd4 wBuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:references:in-reply-to:subject :cc:to:from:mime-version:content-transfer-encoding:dkim-signature :dkim-signature; bh=PEkY/UVa2bQvpyJ7fJC0atYq0k6Jm/d6B0yH0qCw/6w=; b=ZKqgv8Mb/SH6U2lcQHYCWAYmqOo4k4b4MPnsiIAUlRFN/ZQ/gHtAiJSK/7bUvJkJwF G161ByskO/cOgx7joJf+P4zmtQ+bJIYLeP6IhJal4RqBzGJthrr8Col7GLuSw+R655hG TeH7jP84BgTDhWi2nN1aSOKsupsutxZ/1QnkmKy0VVSjQixGbLYtUJYPKkK/ZJ82qnMP w/rg5ZqvgPenO0XbFnOtXK0R2C5srNMuZSKTEDFCc13MaNoD9NgnBg1bDvZ0EkClauid GUDn12UTWKv8jYZE38FXTiSkZPrSp7xu3eRk8aJGlQNZn39eESGMSyY659Zin/k4kuno 7wtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=wEMhCZsN; dkim=neutral (no key) header.i=@suse.de; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y4si2117463edr.319.2021.10.21.18.08.08; Thu, 21 Oct 2021 18:08:34 -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.de header.s=susede2_rsa header.b=wEMhCZsN; dkim=neutral (no key) header.i=@suse.de; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231737AbhJVBIl (ORCPT + 99 others); Thu, 21 Oct 2021 21:08:41 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:50004 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbhJVBIk (ORCPT ); Thu, 21 Oct 2021 21:08:40 -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 BEDEB21952; Fri, 22 Oct 2021 01:06:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1634864782; 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=PEkY/UVa2bQvpyJ7fJC0atYq0k6Jm/d6B0yH0qCw/6w=; b=wEMhCZsNZQcuQ0kJAkTqdYpUMCl3TZ115nWU0YWDJNAKL0M2Kf3lrq4xqTJcis4d7qbugd b7WXUXqYk22haP88iBM3VkSvQnrlHxUllvFm4Rd7wT/UsoDgMUySiIQfpjfBFmMGJWoKrh Sott6UU3PRKwnVH6vBwe1StBLg3ljYk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1634864782; 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=PEkY/UVa2bQvpyJ7fJC0atYq0k6Jm/d6B0yH0qCw/6w=; b=9416TnH5UAKToIOWSeCHdtAf4h2FJtlehDYuTOrX3tByP8YKaOQEYwLIkAEJAzOCwybWwE dZKZ77Hz2VNG2wCQ== 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 73FA91346B; Fri, 22 Oct 2021 01:06:17 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id jFVECIkOcmFwJQAAMHmgww (envelope-from ); Fri, 22 Oct 2021 01:06:17 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 From: "NeilBrown" To: "Mel Gorman" Cc: "Andrew Morton" , "Theodore Ts'o" , "Andreas Dilger" , "Darrick J . Wong" , "Matthew Wilcox" , "Michal Hocko" , "Dave Chinner" , "Rik van Riel" , "Vlastimil Babka" , "Johannes Weiner" , "Jonathan Corbet" , "Linux-MM" , "Linux-fsdevel" , "LKML" , "Mel Gorman" Subject: Re: [PATCH 6/8] mm/vmscan: Centralise timeout values for reclaim_throttle In-reply-to: <20211019090108.25501-7-mgorman@techsingularity.net> References: <20211019090108.25501-1-mgorman@techsingularity.net>, <20211019090108.25501-7-mgorman@techsingularity.net> Date: Fri, 22 Oct 2021 12:06:13 +1100 Message-id: <163486477387.17149.7808824931340167601@noble.neil.brown.name> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 19 Oct 2021, Mel Gorman wrote: ... > + switch(reason) { > + case VMSCAN_THROTTLE_NOPROGRESS: > + case VMSCAN_THROTTLE_WRITEBACK: > + timeout = HZ/10; > + > + if (atomic_inc_return(&pgdat->nr_writeback_throttled) == 1) { > + WRITE_ONCE(pgdat->nr_reclaim_start, > + node_page_state(pgdat, NR_THROTTLED_WRITTEN)); You have introduced a behaviour change that wasn't flagged in the commit message. Previously nr_writeback_throttled was only incremented for VMSCAN_THROTTLE_WRITEBACK, now it is incremented for VMSCAN_THROTTLE_NOPROGRESS as well. Some justification would be good. > + } > + > + break; > + case VMSCAN_THROTTLE_ISOLATED: > + timeout = HZ/50; > + break; > + default: > + WARN_ON_ONCE(1); > + timeout = HZ; > + break; > } > > prepare_to_wait(wqh, &wait, TASK_UNINTERRUPTIBLE); > ret = schedule_timeout(timeout); > finish_wait(wqh, &wait); > > - if (acct_writeback) > + if (reason == VMSCAN_THROTTLE_ISOLATED) (defect) I think you want "!=" there. While the numbers a still magic, they are now well documented and all in one place - a definite improvement! Thanks, NeilBrown