lkml.org 
[lkml]   [2024]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 3/3] block: introducing a bias over deadline's fifo_time
From
On 2/8/24 01:31, zhaoyang.huang wrote:
> diff --git a/block/mq-deadline.c b/block/mq-deadline.c
> index f958e79277b8..43c08c3d6f18 100644
> --- a/block/mq-deadline.c
> +++ b/block/mq-deadline.c
> @@ -15,6 +15,7 @@
> #include <linux/compiler.h>
> #include <linux/rbtree.h>
> #include <linux/sbitmap.h>
> +#include "../kernel/sched/sched.h"

Is kernel/sched/sched.h perhaps a private scheduler kernel header file? Shouldn't
block layer code only include public scheduler header files?

> @@ -840,7 +842,9 @@ static void dd_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,
> /*
> * set expire time and add to fifo list
> */
> - rq->fifo_time = jiffies + dd->fifo_expire[data_dir];
> + fifo_expire = task_is_realtime(current) ? dd->fifo_expire[data_dir] :
> + CFS_PROPORTION(current, dd->fifo_expire[data_dir]);
> + rq->fifo_time = jiffies + fifo_expire;
> insert_before = &per_prio->fifo_list[data_dir];
> #ifdef CONFIG_BLK_DEV_ZONED
> /*

Making the mq-deadline request expiry time dependent on the task priority seems wrong
to me.

Thanks,

Bart.

\
 
 \ /
  Last update: 2024-05-27 14:55    [W:1.932 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site