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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AAA7C433EF for ; Fri, 22 Oct 2021 01:06:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A63EE6135F for ; Fri, 22 Oct 2021 01:06:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A63EE6135F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id DBC4E900003; Thu, 21 Oct 2021 21:06:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D6B77900002; Thu, 21 Oct 2021 21:06:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C8387900003; Thu, 21 Oct 2021 21:06:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0020.hostedemail.com [216.40.44.20]) by kanga.kvack.org (Postfix) with ESMTP id BA63D900002 for ; Thu, 21 Oct 2021 21:06:24 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 76668181C991A for ; Fri, 22 Oct 2021 01:06:24 +0000 (UTC) X-FDA: 78722282688.21.A1A450F Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf13.hostedemail.com (Postfix) with ESMTP id C753E1043A10 for ; Fri, 22 Oct 2021 01:06:19 +0000 (UTC) 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> X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: C753E1043A10 X-Stat-Signature: tdizqxok94jbamaadk3z71nteckf5ekt Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=wEMhCZsN; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=9416TnH5; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf13.hostedemail.com: domain of neilb@suse.de designates 195.135.220.28 as permitted sender) smtp.mailfrom=neilb@suse.de X-HE-Tag: 1634864779-219595 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 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