From: Ming Lei <ming.lei@redhat.com>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: James Smart <jsmart2021@gmail.com>, Jens Axboe <axboe@kernel.dk>,
Ming Lei <tom.leiming@gmail.com>,
linux-block <linux-block@vger.kernel.org>,
Shagun Agrawal <shagun.agrawal@broadcom.com>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] blk-mq: Fix cpu indexing error in blk_mq_alloc_request_hctx()
Date: Sat, 26 Oct 2019 06:20:00 +0800 [thread overview]
Message-ID: <20191025222000.GC7076@ming.t460p> (raw)
In-Reply-To: <60f569f8-688c-4b8a-86b4-48456253473a@grimberg.me>
On Fri, Oct 25, 2019 at 01:26:46PM -0700, Sagi Grimberg wrote:
>
> > > hctx is specified specifically, it is the 1st command on a new nvme
> > > controller queue. The command *must* be issued on the queue it is to
> > > initialize (this is different from pci nvme). The hctx is specified so the
> > > correct nvme queue is selected when the command comes down the request path.
> > > Saying "don't do that" means one of the following: a) snooping every rq on
> > > the request path to spot initialization ios and move them to the right
> > > queue; or b) creating a duplicate non-blk-mq request path for this 1
> > > initialization io. Both of those are ugly.
> >
> > In nvmf_connect_io_queue(), 'qid' has been encoded into instance of 'struct
> > nvme_command', that means the 'nvme controller' should know the
> > specified queue by parsing the command. So still not understand why you
> > have to submit the command via the specified queue.
>
> The connect command must be send on the queue that it is connecting, the
> qid is telling the controller the id of the queue, but the controller
> still expects the connect to be issued on the queue that it is designed
> to connect (or rather initialize).
>
> in queue_rq we take queue from hctx->driver_data and use it to issue
> the command. The connect is different that it is invoked on a context
> that is not necessarily running from a cpu that maps to this specific
> hctx. So in essence what is needed is a tag from the specific queue tags
> without running cpu consideration.
OK, got it.
If nvmf_connect_io_queue() is only run before setting up IO queues, the
shared tag problem could be solved easily, such as, use a standalone
tagset?
Thanks,
Ming
next prev parent reply other threads:[~2019-10-25 22:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-23 17:57 [PATCH] blk-mq: Fix cpu indexing error in blk_mq_alloc_request_hctx() James Smart
2019-10-24 9:28 ` Ming Lei
2019-10-24 13:02 ` Jens Axboe
2019-10-24 18:53 ` James Smart
2019-10-25 7:22 ` Ming Lei
2019-10-25 20:26 ` Sagi Grimberg
2019-10-25 22:20 ` Ming Lei [this message]
2019-10-25 22:33 ` Sagi Grimberg
2019-10-27 7:23 ` Ming Lei
2019-10-25 20:51 ` Sagi Grimberg
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=20191025222000.GC7076@ming.t460p \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=jsmart2021@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=sagi@grimberg.me \
--cc=shagun.agrawal@broadcom.com \
--cc=tom.leiming@gmail.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.