Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1546251
| From | Paolo Valente <paolo.valente@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 6/8] blk-mq-sched: add framework for MQ capable IO schedulers |
| Date | 2016-12-22 11:00 +0100 |
| Message-ID | <sR8kh-7Pe-13@gated-at.bofh.it> (permalink) |
| References | <sPaTf-2bJ-5@gated-at.bofh.it> <sPaTf-2bJ-11@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 adds a set of hooks that intercepts the blk-mq path of
> allocating/inserting/issuing/completing requests, allowing
> us to develop a scheduler within that framework.
>
> We reuse the existing elevator scheduler API on the registration
> side, but augment that with the scheduler flagging support for
> the blk-mq interfce, and with a separate set of ops hooks for MQ
> devices.
>
> Schedulers can opt in to using shadow requests. Shadow requests
> are internal requests that the scheduler uses for for the allocate
> and insert part, which are then mapped to a real driver request
> at dispatch time. This is needed to separate the device queue depth
> from the pool of requests that the scheduler has to work with.
>
> Signed-off-by: Jens Axboe <axboe@fb.com>
>
...
> diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c
> new file mode 100644
> index 000000000000..b7e1839d4785
> --- /dev/null
> +++ b/block/blk-mq-sched.c
> ...
> +static inline bool
> +blk_mq_sched_allow_merge(struct request_queue *q, struct request *rq,
> + struct bio *bio)
> +{
> + struct elevator_queue *e = q->elevator;
> +
> + if (e && e->type->ops.mq.allow_merge)
> + return e->type->ops.mq.allow_merge(q, rq, bio);
> +
> + return true;
> +}
> +
Something does not seem to add up here:
e->type->ops.mq.allow_merge may be called only in
blk_mq_sched_allow_merge, which, in its turn, may be called only in
blk_mq_attempt_merge, which, finally, may be called only in
blk_mq_merge_queue_io. Yet the latter may be called only if there is
no elevator (line 1399 and 1507 in blk-mq.c).
Therefore, e->type->ops.mq.allow_merge can never be called, both if
there is and if there is not an elevator. Be patient if I'm missing
something huge, but I thought it was worth reporting this.
Paolo
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCHSET v4] blk-mq-scheduling framework Jens Axboe <axboe@fb.com> - 2016-12-17 01:20 +0100
[PATCH 2/8] blk-mq: make mq_ops a const pointer Jens Axboe <axboe@fb.com> - 2016-12-17 01:20 +0100
Re: [PATCHSET v4] blk-mq-scheduling framework Paolo Valente <paolo.valente@linaro.org> - 2016-12-19 12:40 +0100
Re: [PATCHSET v4] blk-mq-scheduling framework Paolo Valente <paolo.valente@linaro.org> - 2016-12-19 19:30 +0100
Re: [PATCHSET v4] blk-mq-scheduling framework Paolo Valente <paolo.valente@linaro.org> - 2016-12-22 16:30 +0100
Re: [PATCH 6/8] blk-mq-sched: add framework for MQ capable IO schedulers Jens Axboe <axboe@fb.com> - 2016-12-21 03:30 +0100
Re: [PATCH 6/8] blk-mq-sched: add framework for MQ capable IO schedulers Paolo Valente <paolo.valente@linaro.org> - 2016-12-22 16:30 +0100
Re: [PATCH 6/8] blk-mq-sched: add framework for MQ capable IO schedulers Paolo Valente <paolo.valente@linaro.org> - 2016-12-22 11:00 +0100
Re: [PATCH 6/8] blk-mq-sched: add framework for MQ capable IO schedulers Paolo Valente <paolo.valente@linaro.org> - 2016-12-22 12:20 +0100
Re: [PATCH 6/8] blk-mq-sched: add framework for MQ capable IO schedulers Paolo Valente <paolo.valente@linaro.org> - 2016-12-23 11:20 +0100
Re: [PATCHSET v4] blk-mq-scheduling framework Omar Sandoval <osandov@osandov.com> - 2016-12-22 18:00 +0100
Re: [PATCHSET v4] blk-mq-scheduling framework Omar Sandoval <osandov@osandov.com> - 2016-12-22 18:20 +0100
csiph-web