> +++ b/block/elevator.c > @@ -612,6 +612,16 @@ int elevator_switch_mq(struct request_queue *q, > } > } > > + /* > + * Is the request queue handled by an IO scheduler that does not > + * respect hardware queues when dispatching? > + */ > + if (new_e && new_e->ops.dispatch_request && > + !(new_e->elevator_features & ELEVATOR_F_MQ_AWARE)) > + blk_queue_flag_set(QUEUE_FLAG_SQ_SCHED, q); > + else > + blk_queue_flag_clear(QUEUE_FLAG_SQ_SCHED, q); Please just set the QUEUE_FLAG_SQ_SCHED flag directly from the mq-deadline and bfq scheduler ans drop the ELEVATOR_F_MQ_AWARE flag. Otherwise this approach looks good.