Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1111008lqd; Thu, 25 Apr 2024 06:27:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUnHdxdTFjrvIrLnlaEJCiZ1XQMNFgfNSH67t/a0Lq0+GPUhz6LROse5nK7n/14A0CjFockanwr1JF7JmlueoUyJzFXjmfiLZcs4b15rA== X-Google-Smtp-Source: AGHT+IGrC63/Q2/Wp3Bkxx2cfjRhYg++yP893M0GM+UMO3fIq8AR+EbvqFiCS1dwj9TKIceEABJK X-Received: by 2002:a05:6a00:2285:b0:6ed:21bc:ed8c with SMTP id f5-20020a056a00228500b006ed21bced8cmr7082024pfe.18.1714051656118; Thu, 25 Apr 2024 06:27:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714051656; cv=pass; d=google.com; s=arc-20160816; b=t8nG6YXKyAQamQvQhBnDJjlGuf7nScXG9pJgNr9kac9r5YH5b5DdjTs/9FRY4nz7IM B2iU6UjE8u//4frFj3GcxJEG9kNMhDBP2grHcjCXDAwq8a6g3jZOcy2DH1TzsH0w4uV0 54RVVnrCcJ484ny+m4W8LKKaaNaT4bLD3X1riQk3jIfS8Q/10Zv8V72w8Wh3yMq58VkW wpaYowzZAmkuzY2eF5n/coxa52NE5p9fqOrfDumZPYMViWLYhn4av0V0GKMOPAjrSnlv WozGGvrVx5nwve0TjdDM1SfK6qfmWVt3C8DIfSm5/VIIrr4dzfRaKYF98NpaFRJgvVS9 KsHA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=xgSGrXjgeDTMOZUYxj5tnwnM2bIYameHd2DixJPDYN0=; fh=UPFM6Qp7tjoFaK3RhfZZmMON/62RLtbMlaYmkVfcQSA=; b=pRKMOQ2pz5HmcX9er+jHkY09q4NAABgKLgMFUStiw15Cypp1MnQU6fRDpSCo/lY73z SupNjeYEovrgSEOHyljCMl5sIu+D5NpcQ/QDchCxsWZ9Gsj0gQoc3DMmt3DQtmK7JaOj WOicNrd0WusNDdrFE9O7QSNAOI28AF9eEtmR/ED3Apaew7tGh250rbD9LQEXftH/bsJE LDCpcVe29+5+e4mqGZwFzwTSikQC+meRdvK+QQDMFgufmgOleWULxtqPaDa/pToscfvG cD2hOhj5EOpblg8d2PBbBux+L6c3OAqZmXl/fKTv25JzHK5zpuHd0s77EbNbk4azrV+G UY7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-kernel+bounces-158577-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158577-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id fd30-20020a056a002e9e00b006f2e94df727si7235713pfb.297.2024.04.25.06.27.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 06:27:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158577-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-kernel+bounces-158577-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158577-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 397A028B69F for ; Thu, 25 Apr 2024 13:17:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BFE67149C71; Thu, 25 Apr 2024 13:17:32 +0000 (UTC) Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E090C149C4B; Thu, 25 Apr 2024 13:17:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714051052; cv=none; b=WFXa9co2L2UMOlLOp7iVCnkTFSXX1zdYcFaWDObfDzIW+FMGN4M+Kz6wcB4zr+Pub3yrHYEyP37wUHO1kdWfGps15d3mF773wE2shVA9h5k5DHKOjV0jEBIzPOKRVfvxAoejCmE1xkkVUWYn36JXPwjpS8qsz5qkMbEkIP0vL0g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714051052; c=relaxed/simple; bh=VpxmnRAZj2qhsDjNee4F9fWraIRUq42RqpYTy4ermGw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=GiPZho7f0BcAE3RscGWRemmZoLYFYD0tbtJavPXnOiF+ghxcP6+QhKB74p1ngA8iByQcSjPFp6+40KLEoRckprZPjFLP016Xuz0ECThzLAHGEsY4Z9+RsHPiVwJIZhz28ZOTQvQtH5Ai27ianLu0Fsfqvtsh6jD7nQHLp1KtH98= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.93.142]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4VQGby1SD4z4f3n6m; Thu, 25 Apr 2024 21:17:18 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.252]) by mail.maildlp.com (Postfix) with ESMTP id 728FA1A0179; 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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/ 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 --- 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