Skip to content
Browse files

Modify interface and operation to comply with blk-mq-sched

As for modifications of the operation, the major changes are the introduction
of a scheduler lock, and the moving to deferred work of the body of the hook
exit_icq. The latter change has been made to avoid deadlocks caused by the
combination of the following facts: 1) such a body  takes the scheduler lock,
and, if not deferred, 2) it does so from inside the exit_icq hook, which is
invoked with the queue lock held, and 3) there is at least one code path,
namely that starting from bfq_bio_merge, which takes these locks in the
opposite order.

Signed-off-by: Paolo Valente <>
  • Loading branch information...
Algodev-github committed Dec 20, 2016
1 parent 44ffdbf commit cf794d80a7f88faff3a4ca37d3cda1a2391ccab1
Showing with 394 additions and 340 deletions.
  1. +0 −4 block/bfq-cgroup-included.c
  2. +379 −316 block/bfq-mq-iosched.c
  3. +15 −20 block/bfq-mq.h
@@ -472,8 +472,6 @@ static struct bfq_group *bfq_find_set_group(struct bfq_data *bfqd,
struct bfq_group *bfqg, *parent;
struct bfq_entity *entity;


bfqg = bfq_lookup_bfqg(bfqd, blkcg);

if (unlikely(!bfqg))
@@ -602,8 +600,6 @@ static struct bfq_group *__bfq_bic_change_cgroup(struct bfq_data *bfqd,
struct bfq_group *bfqg;
struct bfq_entity *entity;


bfqg = bfq_find_set_group(bfqd, blkcg);

if (unlikely(!bfqg))

0 comments on commit cf794d8

Please sign in to comment.
You can’t perform that action at this time.