Re: [PATCH RFC v3 1/2] filemap: defer dropbehind invalidation from IRQ context
From: Jan Kara
Date: Tue Mar 03 2026 - 05:40:59 EST
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",
> https://lore.kernel.org/linux-fsdevel/aaC3LUFa1Jz2ahk3@xxxxxxxxxxxxxxxxxxxx/
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.
Honza
--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR