Re: [PATCH 8/8] RFC: use a TASK_FIFO kthread for read completion support

Dave Chinner
2026-04-10T22:11:36Z

On Thu, Apr 09, 2026 at 06:02:21PM +0200, Christoph Hellwig wrote:
> Commit 3fffb589b9a6 ("erofs: add per-cpu threads for decompression as an
> option") explains why workqueue aren't great for low-latency completion
> handling. Switch to a per-cpu kthread to handle it instead. This code
> is based on the erofs code in the above commit, but further simplified
> by directly using a kthread instead of a kthread_work.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Can we please not go back to the (bad) old days of individual
subsystems needing their own set of per-cpu kernel tasks just
sitting around idle most of of the time? The whole point of the
workqueue infrastructure was to get rid of this widely repeated
anti-pattern.

If there's a latency problem with workqueue scheduling, then we
should be fixing that problem rather than working around it in every
subsystem that thinkgs it has a workqueue scheduling latency
issue...

-Dave.

--
Dave Chinner
dgc@kernel.org