On 2021/5/27 2:25 PM, Wang Jianchao wrote: > > > On 2021/5/27 9:01 AM, Bart Van Assche wrote: >> Hi Jens, >> >> A feature that is missing from the Linux kernel for storage devices that >> support I/O priorities is to set the I/O priority in requests involving page >> cache writeback. Since the identity of the process that triggers page cache >> writeback is not known in the writeback code, the priority set by ioprio_set() >> is ignored. However, an I/O cgroup is associated with writeback requests >> by certain filesystems. Hence this patch series that implements the following >> changes for the mq-deadline scheduler: > Hi Bart > > How about implement this feature based on the rq-qos framework ? > Maybe it is better to make mq-deadline a pure io-scheduler. In addition, it is more flexible to combine different io-scheduler and rq-qos policy if we take io priority as a new policy ;) > > Best regards > Jianchao > >> * Make the I/O priority configurable per I/O cgroup. >> * Change the I/O priority of requests to the lower of (request I/O priority, >> cgroup I/O priority). >> * Introduce one queue per I/O priority in the mq-deadline scheduler. >> >> Please consider this patch series for kernel v5.14. >> >> Thanks, >> >> Bart. >> >> Bart Van Assche (9): >> block/mq-deadline: Add several comments >> block/mq-deadline: Add two lockdep_assert_held() statements >> block/mq-deadline: Remove two local variables >> block/mq-deadline: Rename dd_init_queue() and dd_exit_queue() >> block/mq-deadline: Improve compile-time argument checking >> block/mq-deadline: Reduce the read expiry time for non-rotational >> media >> block/mq-deadline: Reserve 25% of tags for synchronous requests >> block/mq-deadline: Add I/O priority support >> block/mq-deadline: Add cgroup support >> >> block/Kconfig.iosched | 6 + >> block/Makefile | 1 + >> block/mq-deadline-cgroup.c | 206 +++++++++++++++ >> block/mq-deadline-cgroup.h | 73 ++++++ >> block/mq-deadline.c | 524 +++++++++++++++++++++++++++++-------- >> 5 files changed, 695 insertions(+), 115 deletions(-) >> create mode 100644 block/mq-deadline-cgroup.c >> create mode 100644 block/mq-deadline-cgroup.h >>