Loading block/bfq-iosched.c +8 −12 Original line number Original line Diff line number Diff line Loading @@ -3946,7 +3946,6 @@ static struct request *__bfq_dispatch_request(struct blk_mq_hw_ctx *hctx) #if defined(CONFIG_BFQ_GROUP_IOSCHED) && defined(CONFIG_DEBUG_BLK_CGROUP) #if defined(CONFIG_BFQ_GROUP_IOSCHED) && defined(CONFIG_DEBUG_BLK_CGROUP) static void bfq_update_dispatch_stats(struct request_queue *q, static void bfq_update_dispatch_stats(struct request_queue *q, struct request *rq, struct request *rq, struct bfq_queue *in_serv_queue, bool idle_timer_disabled) bool idle_timer_disabled) { { struct bfq_queue *bfqq = rq ? RQ_BFQQ(rq) : NULL; struct bfq_queue *bfqq = rq ? RQ_BFQQ(rq) : NULL; Loading @@ -3968,17 +3967,15 @@ static void bfq_update_dispatch_stats(struct request_queue *q, * bfqq_group(bfqq) exists as well. * bfqq_group(bfqq) exists as well. */ */ spin_lock_irq(q->queue_lock); spin_lock_irq(q->queue_lock); if (idle_timer_disabled) if (bfqq && idle_timer_disabled) /* /* * Since the idle timer has been disabled, * It could be possible that current active * in_serv_queue contained some request when * queue and group might got updated along with * __bfq_dispatch_request was invoked above, which * request via. __bfq_dispatch_request. * implies that rq was picked exactly from * So, always use current active request to * in_serv_queue. Thus in_serv_queue == bfqq, and is * derive its associated bfq queue and group. * therefore guaranteed to exist because of the above * arguments. */ */ bfqg_stats_update_idle_time(bfqq_group(in_serv_queue)); bfqg_stats_update_idle_time(bfqq_group(bfqq)); if (bfqq) { if (bfqq) { struct bfq_group *bfqg = bfqq_group(bfqq); struct bfq_group *bfqg = bfqq_group(bfqq); Loading @@ -3991,7 +3988,6 @@ static void bfq_update_dispatch_stats(struct request_queue *q, #else #else static inline void bfq_update_dispatch_stats(struct request_queue *q, static inline void bfq_update_dispatch_stats(struct request_queue *q, struct request *rq, struct request *rq, struct bfq_queue *in_serv_queue, bool idle_timer_disabled) {} bool idle_timer_disabled) {} #endif #endif Loading @@ -4014,7 +4010,7 @@ static struct request *bfq_dispatch_request(struct blk_mq_hw_ctx *hctx) spin_unlock_irq(&bfqd->lock); spin_unlock_irq(&bfqd->lock); bfq_update_dispatch_stats(hctx->queue, rq, in_serv_queue, bfq_update_dispatch_stats(hctx->queue, rq, idle_timer_disabled); idle_timer_disabled); return rq; return rq; Loading Loading
block/bfq-iosched.c +8 −12 Original line number Original line Diff line number Diff line Loading @@ -3946,7 +3946,6 @@ static struct request *__bfq_dispatch_request(struct blk_mq_hw_ctx *hctx) #if defined(CONFIG_BFQ_GROUP_IOSCHED) && defined(CONFIG_DEBUG_BLK_CGROUP) #if defined(CONFIG_BFQ_GROUP_IOSCHED) && defined(CONFIG_DEBUG_BLK_CGROUP) static void bfq_update_dispatch_stats(struct request_queue *q, static void bfq_update_dispatch_stats(struct request_queue *q, struct request *rq, struct request *rq, struct bfq_queue *in_serv_queue, bool idle_timer_disabled) bool idle_timer_disabled) { { struct bfq_queue *bfqq = rq ? RQ_BFQQ(rq) : NULL; struct bfq_queue *bfqq = rq ? RQ_BFQQ(rq) : NULL; Loading @@ -3968,17 +3967,15 @@ static void bfq_update_dispatch_stats(struct request_queue *q, * bfqq_group(bfqq) exists as well. * bfqq_group(bfqq) exists as well. */ */ spin_lock_irq(q->queue_lock); spin_lock_irq(q->queue_lock); if (idle_timer_disabled) if (bfqq && idle_timer_disabled) /* /* * Since the idle timer has been disabled, * It could be possible that current active * in_serv_queue contained some request when * queue and group might got updated along with * __bfq_dispatch_request was invoked above, which * request via. __bfq_dispatch_request. * implies that rq was picked exactly from * So, always use current active request to * in_serv_queue. Thus in_serv_queue == bfqq, and is * derive its associated bfq queue and group. * therefore guaranteed to exist because of the above * arguments. */ */ bfqg_stats_update_idle_time(bfqq_group(in_serv_queue)); bfqg_stats_update_idle_time(bfqq_group(bfqq)); if (bfqq) { if (bfqq) { struct bfq_group *bfqg = bfqq_group(bfqq); struct bfq_group *bfqg = bfqq_group(bfqq); Loading @@ -3991,7 +3988,6 @@ static void bfq_update_dispatch_stats(struct request_queue *q, #else #else static inline void bfq_update_dispatch_stats(struct request_queue *q, static inline void bfq_update_dispatch_stats(struct request_queue *q, struct request *rq, struct request *rq, struct bfq_queue *in_serv_queue, bool idle_timer_disabled) {} bool idle_timer_disabled) {} #endif #endif Loading @@ -4014,7 +4010,7 @@ static struct request *bfq_dispatch_request(struct blk_mq_hw_ctx *hctx) spin_unlock_irq(&bfqd->lock); spin_unlock_irq(&bfqd->lock); bfq_update_dispatch_stats(hctx->queue, rq, in_serv_queue, bfq_update_dispatch_stats(hctx->queue, rq, idle_timer_disabled); idle_timer_disabled); return rq; return rq; Loading