Re: [PATCH v2 1/2] workqueue: new struct io_work

Tejun Heo
2024-07-02T16:40:27Z

Hello,

On Tue, Jul 02, 2024 at 05:27:19PM +0800, yi sun wrote:
> Yes, adding the io priority attribute to work will bring huge benefits in the
> following scenarios:
> The system has huge IO pressure (these IOs may all be low-priority IOs),
> and a work (we hope to complete quickly) is also doing IO. If this work
> does not set IO priority, it will be blocked because it is difficult to get IO
> resources. And if this work sets a high IO priority and passes the IO priority
> to kworker, then this work will be completed quickly (as we expect).

As I wrote previously, you can still get trapped in a pretty bad priority
inversion whether from workqueue concurrency or queue depth exhaustion. I'm
sure that there's some spectrum of contention conditions that can be helped
with just setting ioprio, but it's a pretty partial solution.

Thanks.

--
tejun