Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1658879lqm; Fri, 3 May 2024 02:31:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVX0BIjwld3uykNwsm0Dq+yVUD2AV9+mTxKT4NXa7O2t5jV2j0yxxD5qR/4RBj0DS1Jre+E4zKWu1/85/51Z16UhpT5BZlDW712DvUDTQ== X-Google-Smtp-Source: AGHT+IERTB47B8BK0gVTnErOMaZSmIq2aZz3xTS2klInkTztki9TO/j8RBw2huicUprmN4ilYziE X-Received: by 2002:a05:6870:b14d:b0:22e:bcfd:deb0 with SMTP id a13-20020a056870b14d00b0022ebcfddeb0mr2557865oal.41.1714728704353; Fri, 03 May 2024 02:31:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714728704; cv=pass; d=google.com; s=arc-20160816; b=kZ1VHgGi9jZ/lua7JXp1UQ8+9oqesaitzS2/0urTOUUlcC4nTa1f/CXBJVNNzA++1j QgoSlZNIqKkvqWQA5XcaqOlyTR96/Z7EZQxuTmfWoD292ESbI9setRRQjPJHIeXiPfN3 HakPfsxEKKVMHm9Ht/f2bEuuaQqinXm0L+RhApw0j7TgfMO9MXn0A0BF8PhEQoYH37No kFNgJZ+QIvcKRtffXTC1c/G1MgeWIyJTrXlxVTnYUhB/5IxUodQPiMu9arh/pEFDiSkC BgIJt/QdKTMNJ5+m8L5duTCWYQB5cbp+vQKnucVDZ842h6W27wmN05UUSudJl9WdZ0rZ JiFw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature:dkim-signature :dkim-signature; bh=FQLsjALtF8Dtf2dnf/M68oWEcW8pNv5BhZPogrR45fk=; fh=cyTtCxWNNWjbmQCbLB20n5Wb3iyni5RKXxWgR8o20ls=; b=UkzowGH9unKmcBvFnxrSpZqVsxhJrOZMUEeIUFBmlzch+o8PbHSX/k9HO4AMfGQfOz x/RuJVNeTIi3wu4uPLLybLHkFFJVxWVjWM0nNyxZDEyFx7J/gffleuC0gtK6cPLNtTLC EFQkCRmBx506s/N5n6rDeeAckg5szAqYQtOZRVMmRERsRTQxNGsSX3evYMa64ZWUldYI HcicXcyyIOELjY0threYTW1obJBodxmfFX977SuetKmUZcSZMZmtML4PnSneHuWyiwB+ VY097JCHPy0jvqHCIro8h9Eh9ZufAN3aHv3jX4B2kj1de6+kcxRl1lxONT71P5dgaZgJ JZ2g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=Fo3Gasdm; dkim=neutral (no key) header.i=@suse.cz; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=ax0ntS1G; dkim=neutral (no key) header.i=@suse.cz; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-167466-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167466-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e1-20020a63f541000000b005f3e0556e31si2617753pgk.863.2024.05.03.02.31.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 02:31:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-167466-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=Fo3Gasdm; dkim=neutral (no key) header.i=@suse.cz; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=ax0ntS1G; dkim=neutral (no key) header.i=@suse.cz; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-167466-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167466-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E90BC282C08 for ; Fri, 3 May 2024 09:31:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BCC4914F9F9; Fri, 3 May 2024 09:31:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="Fo3Gasdm"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="J9+Xtyq3"; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="ax0ntS1G"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="Q0B1ph2D" Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5729214F9D8; Fri, 3 May 2024 09:31:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714728685; cv=none; b=kdZrHUvLazX9yzzBmMwFVM8pxNi47Q3SYGBlyWZ/wEJhAz5upevuadeQysYJm1iUXWmNFje6mW/LIIPW5aspU0YmXzHu7njwzCQ1s9r8FdFCPhSfI6GEnyQTmBqUCg5iX/BkcHdICHxjnqotwMsW6aYIJObEEqN4A10Y8ziWt9Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714728685; c=relaxed/simple; bh=rq1B3V4Ttff1GxzycqF2I+P0+qaiI+ckG2zzJcA4MXo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VSP7nYDpyVSLb+PtfM6dJuhQJxDspfDEkJ9AFuBxjk1B95wXWiN+H8u5hvnITWiIM+t+rVomPXT0qfvs72+/NmKsgwArS/ipY8qpDbB0QfGJgVZFLkcsC/9IGa1+xolyqeFpfAJ2DAVLlKb0zvRarUdtMuOQySDMZqf6ivhlbOA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=Fo3Gasdm; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=J9+Xtyq3; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=ax0ntS1G; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=Q0B1ph2D; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 4958920002; Fri, 3 May 2024 09:31:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1714728682; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FQLsjALtF8Dtf2dnf/M68oWEcW8pNv5BhZPogrR45fk=; b=Fo3GasdmI/w2XYV+lWiI3ZTLoS7TPis247itBZfBT7p4cb0j4aRi6uKL7KV+tFoxi3FjLC YzI7vXyoREZlNuwyMfZ1B9APr5i3EQPdabNyzLhaoVyW7gVbVf5dMJR8VdBwItjEOYspmu IV1izz/KPN8rYT7ByKwcyJXfJAAUxkw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1714728682; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FQLsjALtF8Dtf2dnf/M68oWEcW8pNv5BhZPogrR45fk=; b=J9+Xtyq3R/qge9xbc65qxhonMt9b2smjsqeQ1fwJjoIz8lErIatZstpb0ZUPlZwY7lwsim wo28StX4/lJyv4BQ== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=ax0ntS1G; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=Q0B1ph2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1714728681; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FQLsjALtF8Dtf2dnf/M68oWEcW8pNv5BhZPogrR45fk=; b=ax0ntS1GXzWM2nK4IbPmigJIwDNtELCjSAb7YpvvKaZq+oVb5PSr6Xg4V0hC4kbZV4l2PC xzmibNkDOXgy2WrgugIrS1rliANiHfqfxirmKGA1yrOwvyHBXQkEdPZtOJyzov3O21Sy3u 7NZlkrEv2S35FIHsfMU5AotPunmOQPk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1714728681; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FQLsjALtF8Dtf2dnf/M68oWEcW8pNv5BhZPogrR45fk=; b=Q0B1ph2DL2HjHzFBldKprMx5fGpYptya5mIigYIbEHvzzk91PC/MIfT+219ijMRvfyYmWb TzBggLKtcDB502Bg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 3959E139CB; Fri, 3 May 2024 09:31:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id L7/5DemuNGalMgAAD6G6ig (envelope-from ); Fri, 03 May 2024 09:31:21 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 00723A0A12; Fri, 3 May 2024 11:31:16 +0200 (CEST) Date: Fri, 3 May 2024 11:31:16 +0200 From: Jan Kara To: Kemeng Shi Cc: willy@infradead.org, akpm@linux-foundation.org, tj@kernel.org, jack@suse.cz, hcochran@kernelspring.com, axboe@kernel.dk, mszeredi@redhat.com, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/4] mm: call __wb_calc_thresh instead of wb_calc_thresh in wb_over_bg_thresh Message-ID: <20240503093116.jwur3sb3rwnjsin3@quack3> References: <20240425131724.36778-1-shikemeng@huaweicloud.com> <20240425131724.36778-4-shikemeng@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240425131724.36778-4-shikemeng@huaweicloud.com> X-Spam-Level: X-Spamd-Result: default: False [-4.00 / 50.00]; BAYES_HAM(-2.99)[99.97%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_RHS_NOT_FQDN(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCVD_COUNT_THREE(0.00)[3]; MIME_TRACE(0.00)[0:+]; FUZZY_BLOCKED(0.00)[rspamd.com]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCPT_COUNT_SEVEN(0.00)[11]; DNSWL_BLOCKED(0.00)[2a07:de40:b281:106:10:150:64:167:received,2a07:de40:b281:104:10:150:64:97:from]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; MISSING_XM_UA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DKIM_TRACE(0.00)[suse.cz:+]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,huaweicloud.com:email,suse.cz:dkim,suse.cz:email,suse.com:email] X-Rspamd-Action: no action X-Rspamd-Queue-Id: 4958920002 X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Score: -4.00 On Thu 25-04-24 21:17:23, Kemeng Shi wrote: > Call __wb_calc_thresh to calculate wb bg_thresh of gdtc in > wb_over_bg_thresh to remove unnecessary wrap in wb_calc_thresh. > > Signed-off-by: Kemeng Shi Looks good. Feel free to add: Reviewed-by: Jan Kara Honza > --- > mm/page-writeback.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/page-writeback.c b/mm/page-writeback.c > index 14893b20d38c..22e1acec899e 100644 > --- a/mm/page-writeback.c > +++ b/mm/page-writeback.c > @@ -2117,7 +2117,7 @@ bool wb_over_bg_thresh(struct bdi_writeback *wb) > if (gdtc->dirty > gdtc->bg_thresh) > return true; > > - thresh = wb_calc_thresh(gdtc->wb, gdtc->bg_thresh); > + thresh = __wb_calc_thresh(gdtc, gdtc->bg_thresh); > if (thresh < 2 * wb_stat_error()) > reclaimable = wb_stat_sum(wb, WB_RECLAIMABLE); > else > -- > 2.30.0 > -- Jan Kara SUSE Labs, CR