linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Andrew Morton <akpm@linux-foundation.org>,
	"Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: Tejun Heo <tj@kernel.org>,
	Maxim Patlasov <mpatlasov@parallels.com>, Jan Kara <jack@suse.cz>,
	Zach O'Keefe <zokeefe@google.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Danilo Krummrich <dakr@kernel.org>,
	Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Brendan Jackman <jackmanb@google.com>,
	Johannes Weiner <hannes@cmpxchg.org>, Zi Yan <ziy@nvidia.com>,
	Joanne Koong <joannelkoong@gmail.com>,
	Jingbo Xu <jefflexu@linux.alibaba.com>,
	Jeff Layton <jlayton@kernel.org>,
	Miklos Szeredi <mszeredi@redhat.com>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-mm@kvack.org,
	Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH] mm, vmstat: remove the NR_WRITEBACK_TEMP node_stat_item counter
Date: Mon, 7 Jul 2025 16:14:28 +0200	[thread overview]
Message-ID: <5a848e15-6a57-4ecb-a015-d4f358b8a5d3@suse.cz> (raw)
In-Reply-To: <20250625-nr_writeback_removal-v1-1-7f2a0df70faa@suse.cz>

On 6/25/25 17:51, Vlastimil Babka wrote:
> The only user of the counter (FUSE) was removed in commit 0c58a97f919c
> ("fuse: remove tmp folio for writebacks and internal rb tree") so follow
> the established pattern of removing the counter and hardcoding 0 in
> meminfo output, as done recently with NR_BOUNCE. Update documentation
> for procfs, including for the value for Bounce that was missed when
> removing its counter.
> 
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
> ---
> The removal of the counter is straightforward. The reason for the large
> Cc list is that there is a comment in mm/page-writeback.c function
> wb_position_ratio() that mentions NR_WRITEBACK_TEMP, and just deleting
> the sentence feels to me it could be the wrong thing to do - maybe the
> strictlimit feature itself is now obsolete? It sure does mention FUSE
> as the main reason to exist, but commit 5a53748568f79 that introduced it
> also mentions slow USB sticks as a possibile scenario. Has that
> happened? I'm not familiar enough with this so I'd rather highlight this
> and ask for input here than make "git grep NR_WRITEBACK_TEMP" return
> nothing.

Thanks all for the input. Andrew, please squash in this fixup. The changelog
of that can be appended to the changelog of the original patch. Thanks.

----8<----
From 55d9070995010991abc0c6dbd68a8a53b5d622bc Mon Sep 17 00:00:00 2001
From: Vlastimil Babka <vbabka@suse.cz>
Date: Mon, 7 Jul 2025 16:09:31 +0200
Subject: [PATCH] mm, vmstat: remove the NR_WRITEBACK_TEMP node_stat_item
 counter-fix

Also remove the mention of NR_WRITEBACK_TEMP implications from a comment
in wb_position_ratio(). The rest of the comment there about fuse setting
bdi->max_ratio to 1% is still correct.

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
---
 mm/page-writeback.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 72b0ff0d4bae..3e248d1c3969 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -1101,9 +1101,7 @@ static void wb_position_ratio(struct dirty_throttle_control *dtc)
 	 * such filesystems balance_dirty_pages always checks wb counters
 	 * against wb limits. Even if global "nr_dirty" is under "freerun".
 	 * This is especially important for fuse which sets bdi->max_ratio to
-	 * 1% by default. Without strictlimit feature, fuse writeback may
-	 * consume arbitrary amount of RAM because it is accounted in
-	 * NR_WRITEBACK_TEMP which is not involved in calculating "nr_dirty".
+	 * 1% by default.
 	 *
 	 * Here, in wb_position_ratio(), we calculate pos_ratio based on
 	 * two values: wb_dirty and wb_thresh. Let's consider an example:
-- 
2.50.0





      parent reply	other threads:[~2025-07-07 14:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-25 15:51 Vlastimil Babka
2025-06-25 21:38 ` Joanne Koong
2025-06-26  7:00   ` Jan Kara
2025-06-30  4:02     ` Miklos Szeredi
2025-07-07 14:14 ` Vlastimil Babka [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5a848e15-6a57-4ecb-a015-d4f358b8a5d3@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=corbet@lwn.net \
    --cc=dakr@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=jack@suse.cz \
    --cc=jackmanb@google.com \
    --cc=jefflexu@linux.alibaba.com \
    --cc=jlayton@kernel.org \
    --cc=joannelkoong@gmail.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=mpatlasov@parallels.com \
    --cc=mszeredi@redhat.com \
    --cc=rafael@kernel.org \
    --cc=surenb@google.com \
    --cc=tj@kernel.org \
    --cc=willy@infradead.org \
    --cc=ziy@nvidia.com \
    --cc=zokeefe@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox