Re: [PATCH RFC v3 1/2] filemap: defer dropbehind invalidation from IRQ context
From: Tal Zussman
Date: Wed Mar 11 2026 - 14:36:02 EST
On Tue, Mar 3, 2026 at 5:39 AM Jan Kara <jack@xxxxxxx> wrote:
> On Mon 02-03-26 17:37:23, Matthew Wilcox wrote:
> > On Mon, Mar 02, 2026 at 10:11:19AM +0100, Jan Kara wrote:
> > > Folio batches are relatively small (31 folios). With 4k folios it is very
> > > easy to overflow the batch with a single IO completion. Large folios will
> > > obviously make this less likely but I'm not sure reasonable working of
> > > dropbehind should be dependent on large folios... Not sure how to best
> > > address this though. We could use larger batches but that would mean using
> > > our own array of folios instead of folio_batch.
> >
> > That's why I think we should allow the bio to be tagged as
> > "finish the bio in workqueue context",
>
> Yeah, what you suggested there makes sense to me. The workqueue would
> probably have to be a per-cpu one for performance reasons but otherwise I
> think it's worth a try.
If the consensus is that completing tagged bios in workqueues is the right
approach, I can give that a shot based on Matthew's suggestion.
Jens, does that approach sound reasonable to you?
Thanks,
Tal