Re: [PATCH 2/4] mm: add atomic flush guard for IOCB_DONTCACHE writeback

From: Christoph Hellwig

Date: Tue Apr 07 2026 - 01:20:10 EST


On Mon, Apr 06, 2026 at 09:32:58AM -0400, Jeff Layton wrote:
> > And that is called the writeback thread. So what we should do there
> > is to make sure we queue up writeback on it for each dontcache write.
> > Initially queuing up a wb_writeback_work for each range might be first
> > approximation, although we should probably find a way to just increase
> > a threshold if going down that road.
> >
>
> Ok, I like that idea. I'll give that a shot and see how it does. I'll
> note that there is no way to specify an inode or range (yet) in
> wb_writeback_work().
>
> Do you think it's sufficient to just call something like
> wakeup_flusher_threads_bdi() after every RWF_DONTCACHE write, or should
> I extend wb_writeback_work to allow for doing work on a range within a
> single inode?

I don't think we care about what exact data is written back as this is
not an integrity operation. So just waking the flusher thread sounds
like the right thing, but we might also need a way to communicate
the higher writeback target.