From: Ming Lei <ming.lei@redhat.com>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: zhuxiaohui <zhuxiaohui400@gmail.com>,
axboe@kernel.dk, kbusch@kernel.org, hch@lst.de,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-nvme@lists.infradead.org,
Zhu Xiaohui <zhuxiaohui.400@bytedance.com>
Subject: Re: [PATCH v1] blk-mq: add one blk_mq_req_flags_t type to support mq ctx fallback
Date: Mon, 21 Oct 2024 16:31:26 +0800 [thread overview]
Message-ID: <ZxYRXvyxzlFP_NPl@fedora> (raw)
In-Reply-To: <064a6fb0-0cdb-4634-863d-a06574fcc0fa@grimberg.me>
On Mon, Oct 21, 2024 at 10:05:34AM +0300, Sagi Grimberg wrote:
>
>
>
> On 21/10/2024 4:39, Ming Lei wrote:
> > On Sun, Oct 20, 2024 at 10:40:41PM +0800, zhuxiaohui wrote:
> > > From: Zhu Xiaohui <zhuxiaohui.400@bytedance.com>
> > >
> > > It is observed that nvme connect to a nvme over fabric target will
> > > always fail when 'nohz_full' is set.
> > >
> > > In commit a46c27026da1 ("blk-mq: don't schedule block kworker on
> > > isolated CPUs"), it clears hctx->cpumask for all isolate CPUs,
> > > and when nvme connect to a remote target, it may fails on this stack:
> > >
> > > blk_mq_alloc_request_hctx+1
> > > __nvme_submit_sync_cmd+106
> > > nvmf_connect_io_queue+181
> > > nvme_tcp_start_queue+293
> > > nvme_tcp_setup_ctrl+948
> > > nvme_tcp_create_ctrl+735
> > > nvmf_dev_write+532
> > > vfs_write+237
> > > ksys_write+107
> > > do_syscall_64+128
> > > entry_SYSCALL_64_after_hwframe+118
> > >
> > > due to that the given blk_mq_hw_ctx->cpumask is cleared with no available
> > > blk_mq_ctx on the hw queue.
> > >
> > > This patch introduce a new blk_mq_req_flags_t flag 'BLK_MQ_REQ_ARB_MQ'
> > > as well as a nvme_submit_flags_t 'NVME_SUBMIT_ARB_MQ' which are used to
> > > indicate that block layer can fallback to a blk_mq_ctx whose cpu
> > > is not isolated.
> > blk_mq_alloc_request_hctx()
> > ...
> > cpu = cpumask_first_and(data.hctx->cpumask, cpu_online_mask);
> > ...
> >
> > It can happen in case of non-cpu-isolation too, such as when this hctx hasn't
> > online CPUs, both are same actually from this viewpoint.
> >
> > It is one long-time problem for nvme fc.
>
> For what nvmf is using blk_mq_alloc_request_hctx() is not important. It just
> needs a tag from that hctx. the request execution is running where
> blk_mq_alloc_request_hctx() is running.
I am afraid that just one tag from the specified hw queue isn't enough.
The connection request needs to be issued to the hw queue & completed.
Without any online CPU for this hw queue, the request can't be completed
in case of managed-irq.
thanks,
Ming
next prev parent reply other threads:[~2024-10-21 8:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-20 14:40 [PATCH v1] blk-mq: add one blk_mq_req_flags_t type to support mq ctx fallback zhuxiaohui
2024-10-21 1:39 ` Ming Lei
2024-10-21 7:05 ` Sagi Grimberg
2024-10-21 8:31 ` Ming Lei [this message]
2024-10-21 11:30 ` Sagi Grimberg
2024-10-21 14:36 ` Ming Lei
2024-10-21 15:27 ` Sagi Grimberg
2024-10-22 1:13 ` Ming Lei
2024-10-22 13:23 ` Sagi Grimberg
2024-10-23 5:19 ` Christoph Hellwig
2024-10-23 9:42 ` 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=ZxYRXvyxzlFP_NPl@fedora \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
--cc=zhuxiaohui.400@bytedance.com \
--cc=zhuxiaohui400@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 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).