Re: [PATCH v6 1/4] block: add task-context bio completion infrastructure
From: Christoph Hellwig
Date: Mon May 25 2026 - 01:18:31 EST
On Fri, May 22, 2026 at 06:47:43PM -0400, Tal Zussman wrote:
> > But this 1-jiffie delay also means we unconditionally increase
> > completion latency, which feels like a bad idea. Do you have any
> > measurements that show where it does benefit? Note that queing work
> > already often has very measurable latency on it's own. This also
> > directly contradics the erofs experience that even went to a RT
> > thread to reduce the latency.
>
> I added this per Dave's feedback on v4, where he noted that XFS inodegc
> uses a delayed work item to avoid context switch storms. There's only a
> delay for the first bio in a batch to complete, as we only delay when the
> list is empty. I'll run some experiments and measure context switches,
> completion latency, etc. to see if this is necessary.
The difference is that XFS inodegc is not latency bound. Most of the
time no one cares if it is delayed a bit, in the cases where someone
cares we explicitly flush the queues. I/O completion on the other hand
is something where users very much care about latency.