Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1546438
| From | Paolo Valente <paolo.valente@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 7/8] mq-deadline: add blk-mq adaptation of the deadline IO scheduler |
| Date | 2016-12-22 17:10 +0100 |
| Message-ID | <sRe6m-3cC-29@gated-at.bofh.it> (permalink) |
| References | <sPaTf-2bJ-5@gated-at.bofh.it> <sPaTf-2bJ-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> Il giorno 17 dic 2016, alle ore 01:12, Jens Axboe <axboe@fb.com> ha scritto:
>
> This is basically identical to deadline-iosched, except it registers
> as a MQ capable scheduler. This is still a single queue design.
>
> Signed-off-by: Jens Axboe <axboe@fb.com>
> ---
...
> diff --git a/block/mq-deadline.c b/block/mq-deadline.c
> new file mode 100644
> index 000000000000..3cb9de21ab21
> --- /dev/null
> +++ b/block/mq-deadline.c
> ...
> +/*
> + * remove rq from rbtree and fifo.
> + */
> +static void deadline_remove_request(struct request_queue *q, struct request *rq)
> +{
> + struct deadline_data *dd = q->elevator->elevator_data;
> +
> + list_del_init(&rq->queuelist);
> +
> + /*
> + * We might not be on the rbtree, if we are doing an insert merge
> + */
> + if (!RB_EMPTY_NODE(&rq->rb_node))
> + deadline_del_rq_rb(dd, rq);
> +
I've been scratching my head on the last three instructions, but at no
avail. If I understand correctly, the
list_del_init(&rq->queue list);
removes rq from the fifo list. But, if so, I don't understand how it
could be possible that rq has not been added to the rb_tree too.
Another interpretation that I tried is that the above three lines
handle correctly the following case where rq has not been inserted at
all into deadline fifo queue and rb tree: when dd_insert_request was
executed for rq, blk_mq_sched_try_insert_merge succeeded. Yet, the
list_del_init(&rq->queue list);
does not seem to make sense.
Could you please shed some light on this for me?
Thanks,
Paolo
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 7/8] mq-deadline: add blk-mq adaptation of the deadline IO scheduler Jens Axboe <axboe@fb.com> - 2016-12-17 01:20 +0100 Re: [PATCH 7/8] mq-deadline: add blk-mq adaptation of the deadline IO scheduler Paolo Valente <paolo.valente@linaro.org> - 2016-12-20 10:40 +0100 Re: [PATCH 7/8] mq-deadline: add blk-mq adaptation of the deadline IO scheduler Paolo Valente <paolo.valente@linaro.org> - 2016-12-22 17:10 +0100 Re: [PATCH 7/8] mq-deadline: add blk-mq adaptation of the deadline IO scheduler Paolo Valente <paolo.valente@linaro.org> - 2016-12-22 18:00 +0100
csiph-web