* blk-mq : blk_mq_map_swqueue maybe
@ 2015-04-08 2:10 nimisolo
2015-04-08 3:22 ` Chong Yuan
0 siblings, 1 reply; 2+ messages in thread
From: nimisolo @ 2015-04-08 2:10 UTC (permalink / raw)
To: axboe; +Cc: linux-kernel
Hi Jens,
In blk_mq_map_swqueue(), all the blk_mq_hw_ctx's nr_ctx are set
to zero, and then each blk_mq_ctx's index_hw is set to nr_ctx.
I think the index_hw means the index of the hardware queue that map
to this software queue, so maybe index_hw should be set to
blk_mq_hw_ctx's queue_num.
I'm a student and I probably have misunderstood this code, please help
me to resolve this confusion. Thank you.
static void blk_mq_map_swqueue(struct request_queue *q)
{
.........
queue_for_each_hw_ctx(q, hctx, i) {
.........
hctx->nr_ctx = 0;
}
.........
queue_for_each_ctx(q, ctx, i) {
.........
ctx->index_hw = hctx->nr_ctx;
.........
}
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: blk-mq : blk_mq_map_swqueue maybe
2015-04-08 2:10 blk-mq : blk_mq_map_swqueue maybe nimisolo
@ 2015-04-08 3:22 ` Chong Yuan
0 siblings, 0 replies; 2+ messages in thread
From: Chong Yuan @ 2015-04-08 3:22 UTC (permalink / raw)
To: nimisolo; +Cc: axboe, linux-kernel
nimisolo,
在 4/8/2015 10:10 AM, nimisolo 写道:
> Hi Jens,
>
> In blk_mq_map_swqueue(), all the blk_mq_hw_ctx's nr_ctx are set
> to zero, and then each blk_mq_ctx's index_hw is set to nr_ctx.
> I think the index_hw means the index of the hardware queue that map
> to this software queue, so maybe index_hw should be set to
> blk_mq_hw_ctx's queue_num.
Multiple sw queues may be dispatched to one hw queue.
So index_hw here means the index of the sw queue in corresponding hw queue.
--yc
>
> I'm a student and I probably have misunderstood this code, please help
> me to resolve this confusion. Thank you.
>
> static void blk_mq_map_swqueue(struct request_queue *q)
> {
> .........
> queue_for_each_hw_ctx(q, hctx, i) {
> .........
> hctx->nr_ctx = 0;
> }
> .........
> queue_for_each_ctx(q, ctx, i) {
> .........
> ctx->index_hw = hctx->nr_ctx;
> .........
> }
> }
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-08 3:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-08 2:10 blk-mq : blk_mq_map_swqueue maybe nimisolo
2015-04-08 3:22 ` Chong Yuan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox