All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chong Yuan <chong.yuan@memblaze.com>
To: nimisolo <nimisolo@aliyun.com>
Cc: axboe <axboe@kernel.dk>, linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: blk-mq : blk_mq_map_swqueue maybe
Date: Wed, 08 Apr 2015 11:22:01 +0800	[thread overview]
Message-ID: <55249ED9.3050605@memblaze.com> (raw)
In-Reply-To: <806c215d-fd17-471d-96a7-9c083b9fe7db@aliyun.com>

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/
>





      reply	other threads:[~2015-04-08  3:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-08  2:10 blk-mq : blk_mq_map_swqueue maybe nimisolo
2015-04-08  3:22 ` Chong Yuan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55249ED9.3050605@memblaze.com \
    --to=chong.yuan@memblaze.com \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nimisolo@aliyun.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.