On 1/31/23 11:58, Martin K. Petersen wrote: > > Hi Bart! > >> My understanding is that ionice uses the ioprio_set() system call and >> hence only affects foreground I/O but not page cache writeback. This >> is why I introduced the ioprio rq-qos policy (block/blk-ioprio.c). How >> about not adding CDL support in ioprio_set() and only supporting >> configuration of CDL via the v2 cgroup mechanism? > > I suspect applications that care about CDL would probably not go through > the page cache. But I don't have a problem supporting cgroups at all. > > Longer term, for the applications that I'm aware of that care about > this, we'd probably want to be able to specify things on a per-I/O basis > via io_uring, though. Absolutely agree here. Similarly to the legacy ioprio, we need to be able to specify per-io (iouring or libaio) and per context (ioprio_set() or cgroups). I see the per-io and cgroups APIs as complementary. Many of the use cases we are seeing for CDL are transitions from ATA NCQ prio, which relies on the RT class for per IO aio_iorpio field with libaio/iouring. I would like to have continuity with this to facilitate application development. Having only cgroups as the API would disallow per-io async io application engines. -- Damien Le Moal Western Digital Research