From: Ming Lei <ming.lei@redhat.com>
To: Daniel Wagner <dwagner@suse.de>
Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
James Smart <james.smart@broadcom.com>,
Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@fb.com>,
Sagi Grimberg <sagi@grimberg.me>
Subject: Re: [PATCH 0/2] Handle update hardware queues and queue freeze more carefully
Date: Fri, 25 Jun 2021 21:00:25 +0800 [thread overview]
Message-ID: <YNXTaUMAFCA84jfZ@T590> (raw)
In-Reply-To: <20210625122156.x5yzoobuaaec5hss@beryllium.lan>
On Fri, Jun 25, 2021 at 02:21:56PM +0200, Daniel Wagner wrote:
> On Fri, Jun 25, 2021 at 12:16:47PM +0200, Daniel Wagner wrote:
> > this is a followup on the crash I reported in
> >
> > https://lore.kernel.org/linux-block/20210608183339.70609-1-dwagner@suse.de/
> >
> > By moving the hardware check up the crash was gone. Unfortuntatly, I
> > don't understand why this fixes the crash. The per-cpu access is
> > crashing but I can't see why the blk_mq_update_nr_hw_queues() is
> > fixing this problem.
> >
> > Even though I can't explain why it fixes it, I think it makes sense to
> > update the hardware queue mapping bevore we recreate the IO
> > queues. Thus I avoided in the commit message to say it fixes
> > something.
>
> I just discussed this with Hannes and we figured out how the crash is
> fixed by moving the blk_mq_update_nr_hw_queues() before the
> nvme_fc_create_hw_io_queues()/nvme_fc_connect_io_queues().
>
> First of all, blk_mq_update_nr_hw_queues() operates on the normal
> tag_set and not the admin_tag_set. That means when we move the
> blk_mq_update_nr_hw_queues() before the nvme_fc_connect_io_queues(), we
> update the mapping to only CPUs and hwctx which are available. When we
> then do the connect call nvmf_connect_io_queue() we will only allocate
> tags from queues which are not in the BLK_MQ_S_INACTIVE anymore. Hence
> we skip the blk_mq_put_tag() call.
Your patch just reduces the race window, what if all cpus in
hctx->cpumask become offline when calling blk_mq_alloc_request_hctx()?
Thanks,
Ming
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2021-06-25 13:00 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-25 10:16 [PATCH 0/2] Handle update hardware queues and queue freeze more carefully Daniel Wagner
2021-06-25 10:16 ` [PATCH 1/2] nvme-fc: Update hardware queues before using them Daniel Wagner
2021-06-27 13:47 ` James Smart
2021-06-29 1:32 ` Ming Lei
2021-06-29 12:31 ` Hannes Reinecke
2021-06-25 10:16 ` [PATCH 2/2] nvme-fc: Wait with a timeout for queue to freeze Daniel Wagner
2021-06-27 14:04 ` James Smart
2021-06-29 1:39 ` Ming Lei
2021-06-29 7:48 ` Daniel Wagner
2021-07-05 16:34 ` Daniel Wagner
2021-07-06 7:29 ` Ming Lei
2021-07-06 8:10 ` Daniel Wagner
2021-07-06 8:45 ` Ming Lei
2021-07-06 8:59 ` Daniel Wagner
2021-07-06 12:21 ` Daniel Wagner
2021-07-07 2:46 ` Ming Lei
2021-06-29 12:31 ` Hannes Reinecke
2021-06-25 12:21 ` [PATCH 0/2] Handle update hardware queues and queue freeze more carefully Daniel Wagner
2021-06-25 13:00 ` Ming Lei [this message]
2021-06-29 1:31 ` Ming Lei
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=YNXTaUMAFCA84jfZ@T590 \
--to=ming.lei@redhat.com \
--cc=axboe@fb.com \
--cc=dwagner@suse.de \
--cc=james.smart@broadcom.com \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).