From: Jan Kara <jack@suse.cz>
To: Christoph Hellwig <hch@lst.de>
Cc: Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
Carlos Maiolino <cem@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
willy@infradead.org, dlemoal@kernel.org, hans.holmberg@wdc.com,
linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
linux-xfs@vger.kernel.org, "Darrick J. Wong" <djwong@kernel.org>
Subject: Re: [PATCH 1/3] writeback: cleanup writeback_chunk_size
Date: Fri, 17 Oct 2025 14:31:06 +0200 [thread overview]
Message-ID: <wjk2656emsjxsyjm2l7qnsaeg5oospkhwxp2gt3hhj4jsr5ul5@5aps7ijypzol> (raw)
In-Reply-To: <20251017034611.651385-2-hch@lst.de>
On Fri 17-10-25 05:45:47, Christoph Hellwig wrote:
> Return the pages directly when calculated instead of first assigning
> them back to a variable, and directly return for the data integrity /
> tagged case instead of going through an else clause.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
I think I've already given my tag to this patch but anyway, feel free to
add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> fs/fs-writeback.c | 14 +++++---------
> 1 file changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
> index 2b35e80037fe..11fd08a0efb8 100644
> --- a/fs/fs-writeback.c
> +++ b/fs/fs-writeback.c
> @@ -1893,16 +1893,12 @@ static long writeback_chunk_size(struct bdi_writeback *wb,
> * (maybe slowly) sync all tagged pages
> */
> if (work->sync_mode == WB_SYNC_ALL || work->tagged_writepages)
> - pages = LONG_MAX;
> - else {
> - pages = min(wb->avg_write_bandwidth / 2,
> - global_wb_domain.dirty_limit / DIRTY_SCOPE);
> - pages = min(pages, work->nr_pages);
> - pages = round_down(pages + MIN_WRITEBACK_PAGES,
> - MIN_WRITEBACK_PAGES);
> - }
> + return LONG_MAX;
>
> - return pages;
> + pages = min(wb->avg_write_bandwidth / 2,
> + global_wb_domain.dirty_limit / DIRTY_SCOPE);
> + pages = min(pages, work->nr_pages);
> + return round_down(pages + MIN_WRITEBACK_PAGES, MIN_WRITEBACK_PAGES);
> }
>
> /*
> --
> 2.47.3
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2025-10-20 8:56 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 3:45 allow file systems to increase the minimum writeback chunk size v2 Christoph Hellwig
2025-10-17 3:45 ` [PATCH 1/3] writeback: cleanup writeback_chunk_size Christoph Hellwig
2025-10-17 12:31 ` Jan Kara [this message]
2025-10-20 9:35 ` Jan Kara
2025-10-24 14:11 ` Nirjhar Roy (IBM)
2025-10-17 3:45 ` [PATCH 2/3] writeback: allow the file system to override MIN_WRITEBACK_PAGES Christoph Hellwig
2025-10-17 12:32 ` Jan Kara
2025-10-17 15:45 ` Darrick J. Wong
2025-10-20 9:35 ` Jan Kara
2025-10-24 14:33 ` Nirjhar Roy (IBM)
2025-10-24 15:12 ` Christoph Hellwig
2025-10-17 3:45 ` [PATCH 3/3] xfs: set s_min_writeback_pages for zoned file systems Christoph Hellwig
2025-10-22 5:34 ` allow file systems to increase the minimum writeback chunk size v2 Christoph Hellwig
2025-10-22 18:38 ` Andrew Morton
2025-10-29 14:55 ` Christian Brauner
2025-10-29 14:56 ` Christian Brauner
-- strict thread matches above, loose matches on Subject: below --
2025-10-15 6:27 allow file systems to increase the minimum writeback chunk size Christoph Hellwig
2025-10-15 6:27 ` [PATCH 1/3] writeback: cleanup writeback_chunk_size Christoph Hellwig
2025-10-15 7:05 ` Damien Le Moal
2025-10-15 15:48 ` Darrick J. Wong
2025-10-20 9:34 ` Jan Kara
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=wjk2656emsjxsyjm2l7qnsaeg5oospkhwxp2gt3hhj4jsr5ul5@5aps7ijypzol \
--to=jack@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=cem@kernel.org \
--cc=djwong@kernel.org \
--cc=dlemoal@kernel.org \
--cc=hans.holmberg@wdc.com \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-xfs@vger.kernel.org \
--cc=willy@infradead.org \
/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