From patchwork Thu Apr 25 13:17:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13643329 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 B6234C4345F for ; Thu, 25 Apr 2024 13:17:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 03BEF6B0085; Thu, 25 Apr 2024 09:17:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 033096B0083; Thu, 25 Apr 2024 09:17:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DA0956B0087; Thu, 25 Apr 2024 09:17:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id BD0CF6B0082 for ; Thu, 25 Apr 2024 09:17:35 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 749631C1874 for ; Thu, 25 Apr 2024 13:17:35 +0000 (UTC) X-FDA: 82048106070.20.1E1D45C Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) by imf23.hostedemail.com (Postfix) with ESMTP id 65B24140006 for ; Thu, 25 Apr 2024 13:17:32 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=none; spf=pass (imf23.hostedemail.com: domain of shikemeng@huaweicloud.com designates 45.249.212.56 as permitted sender) smtp.mailfrom=shikemeng@huaweicloud.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714051053; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xgSGrXjgeDTMOZUYxj5tnwnM2bIYameHd2DixJPDYN0=; b=71UStuyhN3E1rjFMnB92bdK58/29aBCs33Qpl2A4N82/ntfWoCSbd/T7aqxmUyR3RwzQLJ bBno/c91K5k8X1B5wCRC0Vxoi8abjVxCdkw/pga4XQ4jmrYHEfcyNV0T64ECrIYwm3pCm+ brFwsFXI4ngkj2ZjR9/Op6zGJYis2fI= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714051053; a=rsa-sha256; cv=none; b=XcHtcsf83GLZfRieqnOkaIu5OG5ueMOVDnNyJMLxC2yfTfuTy0wCETwTeGshhpS5TYgdQR b/fgnbG9KdnxZDOkFs3M8lpnYNBsGYbdtRd4/n4LQ/FU3w3Fr2+YU+s1nfWkjFXK99nI6B Oe43Rr+Tr0X8c1M8S78JDV+bL81pbdQ= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=none; spf=pass (imf23.hostedemail.com: domain of shikemeng@huaweicloud.com designates 45.249.212.56 as permitted sender) smtp.mailfrom=shikemeng@huaweicloud.com; dmarc=none Received: from mail.maildlp.com (unknown [172.19.93.142]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4VQGbz5d9nz4f3khm for ; Thu, 25 Apr 2024 21:17:19 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.252]) by mail.maildlp.com (Postfix) with ESMTP id 6472D1A0175 for ; Thu, 25 Apr 2024 21:17:27 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.101.6]) by APP3 (Coremail) with SMTP id _Ch0CgA3+J_kVypmFDcOKw--.42283S5; Thu, 25 Apr 2024 21:17:27 +0800 (CST) From: Kemeng Shi To: willy@infradead.org, akpm@linux-foundation.org Cc: 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: [PATCH v2 3/4] mm: call __wb_calc_thresh instead of wb_calc_thresh in wb_over_bg_thresh Date: Thu, 25 Apr 2024 21:17:23 +0800 Message-Id: <20240425131724.36778-4-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20240425131724.36778-1-shikemeng@huaweicloud.com> References: <20240425131724.36778-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 X-CM-TRANSID: _Ch0CgA3+J_kVypmFDcOKw--.42283S5 X-Coremail-Antispam: 1UD129KBjvdXoWrZF4rCF1UXFWDur1fKryfJFb_yoW3ArgEga 1ftry7CrW3JFyDKa4UC3Z3GFyjkrWDuF1rua1rKFy7JF1jvryDZF1Ikw4kZr9FyF1j9rsI kr93Xr4YqanrGjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbfxYFVCjjxCrM7AC8VAFwI0_Wr0E3s1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l82xGYIkIc2x26280x7IE14v26r1rM2 8IrcIa0xkI8VCY1x0267AKxVW5JVCq3wA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK 021l84ACjcxK6xIIjxv20xvE14v26F1j6w1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r 4UJVWxJr1l84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_ GcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx 0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWU JVW8JwACjcxG0xvY0x0EwIxGrwACI402YVCY1x02628vn2kIc2xKxwCF04k20xvY0x0EwI xGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480 Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7 IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k2 6cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxV AFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x07UAkuxUUUUU= X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 65B24140006 X-Stat-Signature: dpb1eq6ka5ygui844muc67779kre6aj5 X-Rspam-User: X-HE-Tag: 1714051052-504080 X-HE-Meta: U2FsdGVkX1+Hd0pwwfcA8yfy+9AV0SHpjIliphQTLPISryh7xwTD91bOPK66O4Nemd81IKSqL6AKBW/2nVTBDk0f6lPLTV+TpjlyTgeEsnCPOor/d47F0lcI67meQuxJ/cgYUsz52nafmUN9NM9YefjNXGQQwQ+MbV0YEQX2+Dq7UKg8o56b6WVwe/BwLD8oXDjrv1UJgDDctmVDx9TpHR+fmQGuzUIGQWBhgJ2CgluHWy9UvC8NJ2zN/OGT5HlJt9Wk/gSWz5CG9ouWWcG6Wcezh0mvRAifJV6iHfYbnk6liKivMs2KbAmjx33TnnBtRvOPhXX5d/nQog3umPEGLx5U2o9ngGjqV5gvl+yOSHfephA1KgL2KjBbUj6XGkQpQYWsu9kdAeypgwJn8BW90xj/wIcuUCki4KE+QRqXKmFYU91L6FS1Sr83XInHgKuaQekHit3UD1EJeshCcVXC5C8KaIMWzwOnFGy5Qhb9LgvcuayrVokyDXYkDs1u6mpV3Iw1EkOv4xWovbjqQCkZts/oyHzmTAKliL68cr7OOKceA7XktMm///2SbznNpC3xFkId4mI7ZO6eBPGEBjeZiRSQBcwYijHL5U7kWluFmVL03utMO0mdoATswSKMPoBfQgp5VKdIRtvLxbbPBlNcjF0g3B5FblFZx56G+ghc+PXgTNF2Mho06fQdqxV3edIGme2SAiBQIOQBwqBDjmHG6jQYygi4yJXzj3gf/Ozyba/1hIl9VAjbozdbIdO8obf8NWTCpY8nENFl5OXK4kh87B7CJ/ocxpy9fb4Byh8Y3C3tQC7NXiDKtsEbciqdsNxGd7sQdFY4lGBBIn9zJPrcxI6ziPOvHNVf42Rk3wcYDMuq9NHmEjsmGJC7Z8mHdfnppoY9Fr4kou9KE1N3WNRDThZaT70Dyex7bN5WSF/aAo2adbq+BhTKui71XacmE/Gpml0jL7dntKQHwzDfa3T XnjteTfG QB5ObwZ3B+NZ5cJgueXA8PP8UPNB4hEjf82bqrqEsbdnUIZ4KklodJ53YIqp6SAwpXvjMaRuCcBBH1WMmJ+09/3uemgg1CD3QP9kR5juOyj8KmRHAge5WXGa3ofUjX3E1UpeUkl01vvivr7VHT7CbN4qtuK+Vo2V96X+e/ctKbCX9YKZCCihovFTZ+vk5yTp0gmSfYq8JDHzVV0+ofgsKT78uqQ== 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: List-Subscribe: List-Unsubscribe: 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 Reviewed-by: Jan Kara --- 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