From: David Howells <dhowells@redhat.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: dhowells@redhat.com, Paulo Alcantara <pc@manguebit.org>,
netfs@lists.linux.dev
Subject: Re: Function to do end-writeback in bulk
Date: Mon, 24 Aug 2026 16:47:08 +0100 [thread overview]
Message-ID: <762789.1787586428@warthog.procyon.org.uk> (raw)
In-Reply-To: <aoxidVrUtl3F0QUi@casper.infradead.org>
Matthew Wilcox <willy@infradead.org> wrote:
> I hate this API. I much prefer the _iter() style:
I'm not that keen on the _iter() style, but whatever.
However, does that make it harder to do the stats manipulation in bulk in
future?
I was looking at __folio_end_writeback(), and I see:
....
wb = inode_to_wb(inode);
wb_stat_mod(wb, WB_WRITEBACK, -nr);
__wb_writeout_add(wb, nr);
if (!mapping_tagged(mapping, PAGECACHE_TAG_WRITEBACK)) {
wb_inode_writeback_end(wb);
if (mapping->host)
sb_clear_inode_writeback(mapping->host);
}
...
lruvec_stat_mod_folio(folio, NR_WRITEBACK, -nr);
zone_stat_mod_folio(folio, NR_ZONE_WRITE_PENDING, -nr);
node_stat_mod_folio(folio, NR_WRITTEN, nr);
...
And I was thinking those could be done in bulk... but there seems to be an IRQ
disablement requirement around them. Does the folio_xor_flags_has_waiters()
have to be done inside? I presume this is to prevent a set/clear race on the
master WRITEBACK tag.
David
next prev parent reply other threads:[~2026-08-24 15:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 15:09 Function to do end-writeback in bulk David Howells
2026-08-24 15:25 ` Matthew Wilcox
2026-08-24 15:47 ` David Howells [this message]
2026-08-24 16:16 ` Matthew Wilcox
2026-08-24 19:14 ` David Howells
2026-08-24 19:27 ` Matthew Wilcox
2026-09-01 7:17 ` David Howells
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=762789.1787586428@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=netfs@lists.linux.dev \
--cc=pc@manguebit.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