From patchwork Thu Apr 25 13:17:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13643333 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 B3389C4345F for ; Thu, 25 Apr 2024 13:17:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EBDA56B0083; Thu, 25 Apr 2024 09:17:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E465C6B008C; Thu, 25 Apr 2024 09:17:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B30146B0089; Thu, 25 Apr 2024 09:17:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 9116C6B0088 for ; Thu, 25 Apr 2024 09:17:36 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 342B781218 for ; Thu, 25 Apr 2024 13:17:36 +0000 (UTC) X-FDA: 82048106112.10.F47B0C0 Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by imf28.hostedemail.com (Postfix) with ESMTP id 62E2BC001D for ; Thu, 25 Apr 2024 13:17:30 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf28.hostedemail.com: domain of shikemeng@huaweicloud.com designates 45.249.212.51 as permitted sender) smtp.mailfrom=shikemeng@huaweicloud.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714051054; 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=mfcKiU+ZYDyLKaeFzsTSyvHtn5e+BEoR7aL/xw2NvuU=; b=0iRBGpI4tRKT4a/XCeypN6Tns6A1eOcZyRk6hST4DSPa1iAhsOtsUEFeJGmxTzo0a4ZStx EEUEr8OxIVUg//vAYz0zYl6rMZp6Sgvh7R+OUXR8kY1V3nKvOD2yphaNVSb0z7+cCaS+pa t6rAYpVrBoa9YLw1bHq9YhwIJd2u21I= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf28.hostedemail.com: domain of shikemeng@huaweicloud.com designates 45.249.212.51 as permitted sender) smtp.mailfrom=shikemeng@huaweicloud.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714051054; a=rsa-sha256; cv=none; b=2lLz2dyXsakwnYkFCSkwJSf4QGVCk3EroGer1c98IwdRs5Wjno4FLhxdoyvaROIM8U8Q8k zUijTd50iQ9HxftFZsXZ5oLQ13yeosb1wVFFGkgEolP13+6q9dzjBvXr0WczB1TixNTK2E 8wiBjPnlwYRqWEnovEX1Zn9p+BsNHKQ= Received: from mail.maildlp.com (unknown [172.19.163.216]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4VQGbx1lfHz4f3n6Y for ; Thu, 25 Apr 2024 21:17:17 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.252]) by mail.maildlp.com (Postfix) with ESMTP id 7EFFA1A0EAB for ; Thu, 25 Apr 2024 21:17:26 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.101.6]) by APP3 (Coremail) with SMTP id _Ch0CgA3+J_kVypmFDcOKw--.42283S3; Thu, 25 Apr 2024 21:17:26 +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 1/4] mm: enable __wb_calc_thresh to calculate dirty background threshold Date: Thu, 25 Apr 2024 21:17:21 +0800 Message-Id: <20240425131724.36778-2-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--.42283S3 X-Coremail-Antispam: 1UD129KBjvJXoWxZw4rZF1rJryUtr1UCr1kAFb_yoWrAr4fpF W3Xw17CF4UJrZ7ZrsxAFyruFWavws7JrW2qa97Gw1rtwnIkryUKF12kF4vyFy5AF93JFy3 AFWYqryxXF1qyrJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUB0b4IE77IF4wAFF20E14v26ryj6rWUM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUGw A2048vs2IY020Ec7CjxVAFwI0_JFI_Gr1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVW7JVWDJwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV W8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMc Ij6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_ Jr0_Gr1lF7xvr2IYc2Ij64vIr41lFIxGxcIEc7CjxVA2Y2ka0xkIwI1l42xK82IYc2Ij64 vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8G jcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2I x0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK 8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I 0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxUzl1vUUUUU X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 62E2BC001D X-Stat-Signature: oo795k63uz6eq4okcrr6xhty57e6awe7 X-HE-Tag: 1714051050-732170 X-HE-Meta: U2FsdGVkX19/qCjLZhAjY/pIFvjIqF/IKuNknRTjWWe/llafba/arMvTu3c2KT6XThS5EKILv9QZUySWaaeO1eVP+EKP6kqor6YZJFwM7j+f9rDHUAag7hAnHchz0EiOChYOQ4IwvjjfhaApISy5upSvn1GyY99IbG52Wa/GJWK+WlkkN/lzA+pDOYfCfABd5KT12UAgHtAUR6jB7N3ITcwjTr1Fiu6iuRnd9Ye5Sqi4VUMqyf4XhTSIk2zdVfOqCxql8wElbxsCQxkYLaO6j0+AnjW4GOO2NaV/9zzWGy3kTli5h1tyC4YN9isYLJaTFXs7bZRZ4fs9cA09hqRu8Xo0FReIPY6jXmlj7iOjSDoFhiyDCu1dGuLgsvJ8RiTLATeAQpUDXxUNvGtvoJJZABhflBNiXudn7OTHmJEM0oPyH2fSyuH4AwZc4WuPf7040UQr8nLu5PnvjVINJVdV8s0z9ciUOYLyjF6GbcEuMZ0dJXEsu69ILfWc31JtX5Owl6OcRHXZjA0oFHE/yL8gB+QZ4IfWtYdfStK8dCoGZ5+mIQ9TET//YesZ7L1LstrwAAUbGHNY+TOI2avl4kFKjo0IMNA3e4sPs5fdgm8rsUoIRUlfIrbzp+7kxuuPjinBzTz8qGSGf1gnCp41bHTOAZAToFXSYNf6PGYTlXX7hi2al3UmGnHHJty/wa7v7CPfKt4BZXUwZdxbUqonfY1IYcMYqKLeFptqp1ClJUceRwyaaJTeTvyaQ22IC8Hti+x2vsORlrxddW+rMS58bunDZ47nmq7wrVUEVA957qzKTzFJNqTRvkj4Ln4oxnNU1UeMoQR3qAEseiZMGx/3AGt9O5vrOdX3HxZgJcXqOdLa3SNV2YwHzQ0uweRD7Ljois1lupr5/zH/uG+qF7arWbvHMZXNJlmorZ1SXc0B+8gIDaHj7bhKeGH0X3rVRlV5KNPjCl7xyAVkWnLU3i4OaGi J/0lSb1W 8rG3duoehtrRPWyfpkjZeg/F4t/+7GRU6ugjXBg89i/nPoSmGI2gD8sCED6pxqXMfBLDRnORdD7ZiCvCyiJuj2n7x6VVzFA8Z1TFQ5o6rEo8pqMUHEGP5lxl3t6zPioYs8qM3xUAxT90iKfmxrC6CIqwkIUfpsu0kz37Rrz7Q2N56/WO3pfAkI/3s4/qZNytFdjWU9WdIEbvKOWH8EI4LIuZ1+W94OBPEGR/6sTQmNVL0PHs11L3ZTNvq39DbTNQjThoHak9ZdRiS60E= 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: Originally, __wb_calc_thresh always calculate wb's share of dirty throttling threshold. By getting thresh of wb_domain from caller, __wb_calc_thresh could be used for both dirty throttling and dirty background threshold. This is a preparation to correct threshold calculation of wb in cgroup. Signed-off-by: Kemeng Shi Reviewed-by: Jan Kara --- mm/page-writeback.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/mm/page-writeback.c b/mm/page-writeback.c index db5769cb12fd..2a3b68aae336 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -838,13 +838,15 @@ static void mdtc_calc_avail(struct dirty_throttle_control *mdtc, } /** - * __wb_calc_thresh - @wb's share of dirty throttling threshold + * __wb_calc_thresh - @wb's share of dirty threshold * @dtc: dirty_throttle_context of interest + * @thresh: dirty throttling or dirty background threshold of wb_domain in @dtc * - * Note that balance_dirty_pages() will only seriously take it as a hard limit - * when sleeping max_pause per page is not enough to keep the dirty pages under - * control. For example, when the device is completely stalled due to some error - * conditions, or when there are 1000 dd tasks writing to a slow 10MB/s USB key. + * Note that balance_dirty_pages() will only seriously take dirty throttling + * threshold as a hard limit when sleeping max_pause per page is not enough + * to keep the dirty pages under control. For example, when the device is + * completely stalled due to some error conditions, or when there are 1000 + * dd tasks writing to a slow 10MB/s USB key. * In the other normal situations, it acts more gently by throttling the tasks * more (rather than completely block them) when the wb dirty pages go high. * @@ -855,19 +857,20 @@ static void mdtc_calc_avail(struct dirty_throttle_control *mdtc, * The wb's share of dirty limit will be adapting to its throughput and * bounded by the bdi->min_ratio and/or bdi->max_ratio parameters, if set. * - * Return: @wb's dirty limit in pages. The term "dirty" in the context of - * dirty balancing includes all PG_dirty and PG_writeback pages. + * Return: @wb's dirty limit in pages. For dirty throttling limit, the term + * "dirty" in the context of dirty balancing includes all PG_dirty and + * PG_writeback pages. */ -static unsigned long __wb_calc_thresh(struct dirty_throttle_control *dtc) +static unsigned long __wb_calc_thresh(struct dirty_throttle_control *dtc, + unsigned long thresh) { struct wb_domain *dom = dtc_dom(dtc); - unsigned long thresh = dtc->thresh; u64 wb_thresh; unsigned long numerator, denominator; unsigned long wb_min_ratio, wb_max_ratio; /* - * Calculate this BDI's share of the thresh ratio. + * Calculate this wb's share of the thresh ratio. */ fprop_fraction_percpu(&dom->completions, dtc->wb_completions, &numerator, &denominator); @@ -887,9 +890,9 @@ static unsigned long __wb_calc_thresh(struct dirty_throttle_control *dtc) unsigned long wb_calc_thresh(struct bdi_writeback *wb, unsigned long thresh) { - struct dirty_throttle_control gdtc = { GDTC_INIT(wb), - .thresh = thresh }; - return __wb_calc_thresh(&gdtc); + struct dirty_throttle_control gdtc = { GDTC_INIT(wb) }; + + return __wb_calc_thresh(&gdtc, thresh); } unsigned long cgwb_calc_thresh(struct bdi_writeback *wb) @@ -908,7 +911,7 @@ unsigned long cgwb_calc_thresh(struct bdi_writeback *wb) mdtc_calc_avail(&mdtc, filepages, headroom); domain_dirty_limits(&mdtc); - return __wb_calc_thresh(&mdtc); + return __wb_calc_thresh(&mdtc, mdtc.thresh); } /* @@ -1655,7 +1658,7 @@ static inline void wb_dirty_limits(struct dirty_throttle_control *dtc) * wb_position_ratio() will let the dirtier task progress * at some rate <= (write_bw / 2) for bringing down wb_dirty. */ - dtc->wb_thresh = __wb_calc_thresh(dtc); + dtc->wb_thresh = __wb_calc_thresh(dtc, dtc->thresh); dtc->wb_bg_thresh = dtc->thresh ? div64_u64(dtc->wb_thresh * dtc->bg_thresh, dtc->thresh) : 0; From patchwork Thu Apr 25 13:17:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13643331 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 BF854C4345F for ; Thu, 25 Apr 2024 13:17:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5B3B96B0082; Thu, 25 Apr 2024 09:17:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 566C26B0088; Thu, 25 Apr 2024 09:17:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2F2A76B0083; Thu, 25 Apr 2024 09:17:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id E6D856B0082 for ; Thu, 25 Apr 2024 09:17:35 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 5516BA11BE for ; Thu, 25 Apr 2024 13:17:35 +0000 (UTC) X-FDA: 82048106070.19.ED6D5F5 Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) by imf21.hostedemail.com (Postfix) with ESMTP id 83D581C0022 for ; Thu, 25 Apr 2024 13:17:31 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=none; spf=pass (imf21.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=14b37KrNa7X9q1mbbLcgXNBGbcEuQbMP6LfxnICbkfo=; b=Jwu0Yqhd4YFZxpyA6mIUh56qVM97ssACasqQeOIJ61eCyoyhXAt7dN1urL0+aVenD3JlKe w+92ZFVAm27ktWOi3+ujHbzn5TyMuxIkyNHqsXOJdIuu5sy1EN9DZPAPjrU5Wylx95ZWJL lBA+BCdAKiW9Mh/XMJYCb1Av+FmMxDw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714051053; a=rsa-sha256; cv=none; b=nN4prxhwlhuo9vMpeE7xhEDytyKQvdI0chB1UusDzQwjt7GUrI7E6FMxqiKDlNQZ9HJbB1 +lR4XvRfmCPJideljVCxP5ym9knIpwpmXPXldIA+APH1q01TwQ1SopcK7OSH0bmV2Fh/NS HG9zL2squYOsleQkZ70Lb3Ss45dvwZI= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=none; spf=pass (imf21.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.163.235]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4VQGbz2VSqz4f3khc 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 E7BF01A0568 for ; Thu, 25 Apr 2024 21:17:26 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.101.6]) by APP3 (Coremail) with SMTP id _Ch0CgA3+J_kVypmFDcOKw--.42283S4; Thu, 25 Apr 2024 21:17:26 +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 2/4] mm: correct calculation of wb's bg_thresh in cgroup domain Date: Thu, 25 Apr 2024 21:17:22 +0800 Message-Id: <20240425131724.36778-3-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--.42283S4 X-Coremail-Antispam: 1UD129KBjvJXoWxZFy5Zr13Wry7tF1DXw4kCrg_yoW5Gw13pF WkGr1jvr4UJF1xtrsxKa4qgryfta1rtFW7XFZxJw17tw13Gr18Kr17CFWqgFW8AF13J345 ZFs8C397Xr1Dtw7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUB0b4IE77IF4wAFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUXw A2048vs2IY020Ec7CjxVAFwI0_Gr0_Xr1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVW7JVWDJwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV W8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMc Ij6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_ Jr0_Gr1lF7xvr2IYc2Ij64vIr41lFIxGxcIEc7CjxVA2Y2ka0xkIwI1l42xK82IYc2Ij64 vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8G jcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2I x0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK 8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I 0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxU2GYLDUUUU X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 83D581C0022 X-Stat-Signature: jh1x643tfdegtoyjo5uqpj838fd1xnow X-Rspam-User: X-HE-Tag: 1714051051-134215 X-HE-Meta: U2FsdGVkX18h1DC7ER55ZXUgc3vreMs3+rlTEvAO+rzb6HQInL16plawv9OJ4E2R09UUdUN/TpV3dGxn31GaLXjvOm8rBVi9LGACqGKIXg/PiNllSy37KQFsiMMzUCAmPJKFtys623/QwpUh0JEULzjgZVXfUF++rGDny5fNBrUjyWdGu/8sRCtJn7ANgp2D1Keh70ZxAa5n+wSFT1zbsWV0/h/Be0xzN11MuPDpImbWOD02dvJB/B/xATbX8AXsXJMe0J+MwqqaRaSyJs8szTfi7flZiI1drtwfFHdAzXm7nStjoptlnLOZjuhhV8OZGRxXrZOSwoo9tqxdVDp5KvQNlZ9X6uzAnl/oftzNf6L/M2IFNApNboT42AVliOsnwcnt2oSt6UwWKvZajsqvUTJtrd8Q/07YtrwbadLxFnVlY2EO6sCPP/c3spKvaKZE2K57B6Io8gkzYFUJx4IVh+3kyfAJ6iYrYCflU2YOnMqu58d5bI9YwPuOOdVm5GktI47N/NniNNAokmna2dwbluOb9rfONsHNcinmVJDQEkmBPWbQVR1yj9K/qa+ynx1fJhQB4+CG1m7vjW1S4uRRL24utrf1sU/aZ25q5dtsG/WCa54UJQpejgzu4GgaItOcbJjxq/kptV4K1UJjiwyitNjGLrrdkuQNfMmAhiSleVi+o5m/V/4B6jWJMEexUIEYWwdvM9OsM12xBrDDTgliUsyv+vhupeZjAXzWoeh9dpDJzo2V9/9JKZqEt+GmSX22AuSjrkJCl1mK2mce8XHkMZxESV+Yau91j5jgKSfzg0q7bqxPoAKwqnV+rnIE+bFAXH9tkF8roiyeB36fGPBTgtX7HRmQfFNzMO47BdRvHUiKrkAKTTlIw0Aw0KqnQVfblcHUgbVQwZAdpdjh7uZktLqgLNpzVYELB++o5VkRAXh/HBtcicJw2ymrKlonZ4cZnzKlef1BAt4= 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: The wb_calc_thresh is supposed to calculate wb's share of bg_thresh in global domain. To calculate wb's share of bg_thresh in cgroup domain, it's more reasonable to use __wb_calc_thresh in which way we calculate dirty_thresh in cgroup domain in balance_dirty_pages(). Consider following domain hierarchy: global domain (> 20G) / \ cgroup domain1(10G) cgroup domain2(10G) | | bdi wb1 wb2 Assume wb1 and wb2 has the same bandwidth. We have global domain bg_thresh > 2G, cgroup domain bg_thresh 1G. Then we have: wb's thresh in global domain = 2G * (wb bandwidth) / (system bandwidth) = 2G * 1/2 = 1G wb's thresh in cgroup domain = 1G * (wb bandwidth) / (system bandwidth) = 1G * 1/2 = 0.5G At last, wb1 and wb2 will be limited at 0.5G, the system will be limited at 1G which is less than global domain bg_thresh 2G. Test as following: /* make it easier to observe the issue */ echo 300000 > /proc/sys/vm/dirty_expire_centisecs echo 100 > /proc/sys/vm/dirty_writeback_centisecs /* run fio in wb1 */ cd /sys/fs/cgroup echo "+memory +io" > cgroup.subtree_control mkdir group1 cd group1 echo 10G > memory.high echo 10G > memory.max echo $$ > cgroup.procs mkfs.ext4 -F /dev/vdb mount /dev/vdb /bdi1/ fio -name test -filename=/bdi1/file -size=600M -ioengine=libaio -bs=4K \ -iodepth=1 -rw=write -direct=0 --time_based -runtime=600 -invalidate=0 /* run fio in wb2 with a new shell */ cd /sys/fs/cgroup mkdir group2 cd group2 echo 10G > memory.high echo 10G > memory.max echo $$ > cgroup.procs mkfs.ext4 -F /dev/vdc mount /dev/vdc /bdi2/ fio -name test -filename=/bdi2/file -size=600M -ioengine=libaio -bs=4K \ -iodepth=1 -rw=write -direct=0 --time_based -runtime=600 -invalidate=0 Before fix, the wrttien pages of wb1 and wb2 reported from toos/writeback/wb_monitor.py keep growing. After fix, rare written pages are accumulated. There is no obvious change in fio result. Fixes: 74d369443325 ("writeback: Fix performance regression in wb_over_bg_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 2a3b68aae336..14893b20d38c 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -2137,7 +2137,7 @@ bool wb_over_bg_thresh(struct bdi_writeback *wb) if (mdtc->dirty > mdtc->bg_thresh) return true; - thresh = wb_calc_thresh(mdtc->wb, mdtc->bg_thresh); + thresh = __wb_calc_thresh(mdtc, mdtc->bg_thresh); if (thresh < 2 * wb_stat_error()) reclaimable = wb_stat_sum(wb, WB_RECLAIMABLE); else 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 From patchwork Thu Apr 25 13:17:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13643330 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 08354C19F4F for ; Thu, 25 Apr 2024 13:17:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2F8526B0087; Thu, 25 Apr 2024 09:17:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 235686B0088; Thu, 25 Apr 2024 09:17:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F27406B0089; 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 CA09F6B0083 for ; Thu, 25 Apr 2024 09:17:35 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 7D37A12044A for ; Thu, 25 Apr 2024 13:17:35 +0000 (UTC) X-FDA: 82048106070.12.5F22C9F Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by imf14.hostedemail.com (Postfix) with ESMTP id A6F8910001B for ; Thu, 25 Apr 2024 13:17:31 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=none; spf=pass (imf14.hostedemail.com: domain of shikemeng@huaweicloud.com designates 45.249.212.51 as permitted sender) smtp.mailfrom=shikemeng@huaweicloud.com; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714051053; a=rsa-sha256; cv=none; b=yvanGs7xaRr13vEZwsuU3LtEI3KDW23wYOkFWLulX77bNqPenu6F1xcXK/OaUSc2ftjXMN f/PA9IIEFSFcnFaBdBkrVAuOcQZ69p0TWH3UMmPeNPluoDFeAqtVFIVUUD9R8sMKAJl/8T KqpaOvsAReKSTcme/4B9t8n3cS30l5E= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=none; spf=pass (imf14.hostedemail.com: domain of shikemeng@huaweicloud.com designates 45.249.212.51 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=hfP2s6Tcua3B6ieOpfPE+tE92LSarp3LX4yI5xIuBDE=; b=bjeuDu1hqhq5QsOVV76WkcV5POiKuqDYAArn3Znit5vTwhSIH34Fv4JYXVpBQCVXNr8zXO Z/aFlGn0u4goWPE/iNrQfT/uzCUWrb5lIUG2lCBA7br4Gtkq2u1/eYqSWnIzgD+C6h0fAM wvICJspRMAbJX8g5b+mCEKZzE1BS1JI= Received: from mail.maildlp.com (unknown [172.19.163.235]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4VQGby4Jrhz4f3n6p for ; 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 D5B481A0572 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--.42283S6; 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 4/4] mm: remove stale comment __folio_mark_dirty Date: Thu, 25 Apr 2024 21:17:24 +0800 Message-Id: <20240425131724.36778-5-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--.42283S6 X-Coremail-Antispam: 1UD129KBjvdXoW7Gr18Zw1ktF4rGFy3JF1kXwb_yoW3uwb_u3 W8trn8X3y7Kr1xAay2vas3Aw1v9a1DCFy8ZF1ftFnrCa4Fyrs5ZFs5trs0yr1DKr4UWFZF kFnrZr45Ar9rKjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbS8YFVCjjxCrM7AC8VAFwI0_Wr0E3s1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l82xGYIkIc2x26280x7IE14v26r126s 0DM28IrcIa0xkI8VCY1x0267AKxVW5JVCq3wA2ocxC64kIII0Yj41l84x0c7CEw4AK67xG Y2AK021l84ACjcxK6xIIjxv20xvE14v26F1j6w1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14 v26r4UJVWxJr1l84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAF wI0_GcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2 WlYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkE bVWUJVW8JwACjcxG0xvY0x0EwIxGrwACI402YVCY1x02628vn2kIc2xKxwCF04k20xvY0x 0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E 7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcV C0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF 04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7 CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x07UZo7tUUUUU= X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: A6F8910001B X-Stat-Signature: hurwj6hod1omfgoei7bknq65b5rrahwf X-Rspam-User: X-HE-Tag: 1714051051-343904 X-HE-Meta: U2FsdGVkX19zjtilNPS34eWC2M6X5VJTk4FxvRYrIxFH986yJuFQAciA8msrJqh07UICh9jUUNxVz46IW55BqW6vhTHyIWRSScRvM1xErZwZfIlx7wZwV8t7EEc8UWRQSOrr7LwmUMFzfUeXBXBziBHeLjIXHnm/DeRasWBrtTx1OaZPf8tLMHOvDpHbZejIxX3W6FFBFsMApX+lxLwCgVX76bq+PzV33ADu/tV4L5TsM/yTlAgQ4uJSfxkAcDLyaluC2+PaJVvb+6QMWCbJ3bENj3JMBKSE4GI19qp3PnqzVq5v9gF2Vx5lL5KBuq76Og4CF3V/Houw30MA79zocxohQ9vClWMc4TMHap/c+rl8m7SJ+dhdqsCRyX7xjEtWfiJyWMarfCxTWADQLAv+ieh7o1gZBGXEnyHK1RyqN//pfSa104Uq4D21uJVY+7qwFcuiKICBWgmsVE3Raed4Q8bbVYkz1JaAj7CEafeo08xqXduy6uH8lUeTGxvYPc4KOTAmnN4GKXi17n7UQLaPOSRLB4nz84lg9g/EzrYAQ+oRpQFUSYsfWBp7PCaCu2Xld+r+sjXZ8bVRrvyWTO/qj8j+pPXHLDbW4yQFUTijWgTHLNAVXpyMk6n14hSd8oTj6v4RIhUD8wPgC7qeQy5lXvTyOZGe0Knmx1JVNORPENUk7Rycyk1p/a84ZpJYDplhZCrjJIG6ZOEo45z2KGLzR7pFoZ2+EI9CNHnHEbTasYpGG2b8ujcrGGBFyOnR0R7TS4qcD9+1bEPZ9JY1lHb+xV62CAU3m50JxH0NL9kEdn4BBDRXB6O3jq8XtlsaTCIVemZqIzR1U3ozHNyANeefSVScbSGzrt61AqdKchSJjYLxc/bKlHayhYNjWF4kRsEZyR7nu+N113X1kb/78il7ctOlacqbjm/vO102Wz/Uu+znqHB6qluvFjXHY1+4nIS/T1V0q6fWlxQ8j3LGRd3 WUPLDIKH 013gUct1PaM+4iPEFZhxVc+rls81iK469qR/pwUoml9+PKI97TCf4BMSzAekACS4eIlVCQWYLYGCv9vMEvulggpdbc4+vNw1N7tCXeATEVWgZWcx14freFeOcIjQeEWeHjDX8FCFlb3wKMFYacMBgrxpMC7ILmBy3kRPw7nT9uWcbTx+MgWOhBtrTKJAA8+Ok4rumQMf5Kl6SR3oKMEOrXvPOtsLtsmc3iluuNCWfu/+gE9hKpToAa0AzX4gv66r0wXMM5/Ux1Dvf/WPL8JhP6MdKA3KxWqE9ABCNKCGp/esbWy+3uBwBpnn6Exz7Ru5xDvSxGu6BP9FIy4Lyj5dWoAKNecjHuSbT/JKl 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: The __folio_mark_dirty will not mark inode dirty any longer. Remove the stale comment of it. Signed-off-by: Kemeng Shi Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Jan Kara --- mm/page-writeback.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 22e1acec899e..692c0da04cbd 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -2721,8 +2721,7 @@ void folio_account_cleaned(struct folio *folio, struct bdi_writeback *wb) } /* - * Mark the folio dirty, and set it dirty in the page cache, and mark - * the inode dirty. + * Mark the folio dirty, and set it dirty in the page cache. * * If warn is true, then emit a warning if the folio is not uptodate and has * not been truncated.