cmdprio: add mode to make the logic easier to reason about
authorNiklas Cassel <niklas.cassel@wdc.com>
Fri, 12 Nov 2021 09:54:43 +0000 (09:54 +0000)
committerJens Axboe <axboe@kernel.dk>
Fri, 12 Nov 2021 15:49:55 +0000 (08:49 -0700)
commit97f2d4840d5dedae0d4baa79c78784bd80d82a5d
tree11e533aed39e726cfd7bc25d6f17d6d46a44992c
parent127715b61286b1b77cd2c3fe7efacc01d71222ea
cmdprio: add mode to make the logic easier to reason about

Add a new field "mode", in order to know if we are determining IO
priorities according to cmdprio_percentage or to cmdprio_bssplit.

This makes the logic easier to reason about, and allows us to
remove the "use_cmdprio" variable from the ioengines themselves.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Link: https://lore.kernel.org/r/20211112095428.158300-8-Niklas.Cassel@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/cmdprio.c
engines/cmdprio.h
engines/io_uring.c
engines/libaio.c