[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <63310a08-e01f-464d-9f46-54bb817f2121@kernel.org>
Date: Thu, 3 Jul 2025 08:59:47 +0900
From: Damien Le Moal <dlemoal@...nel.org>
To: Kamaljit Singh <Kamaljit.Singh1@....com>,
"kbusch@...nel.org" <kbusch@...nel.org>, "axboe@...nel.dk"
<axboe@...nel.dk>, hch <hch@....de>, "sagi@...mberg.me" <sagi@...mberg.me>,
"linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Cc: "cassel@...nel.org" <cassel@...nel.org>
Subject: Re: [PATCH v2 3/3] nvme: prevent ioq creation for discovery
controllers
On 7/3/25 3:09 AM, Kamaljit Singh wrote:
> Hi Damien,
>
> On 7/1/25 19:18, Damien Le Moal wrote:
>>> /*
>>> - * An admin controller has one admin queue, but no I/O queues.
>>> + * An admin or discovery controller has one admin queue, but no I/O queues.
>>> * Override queue_count so it only creates an admin queue.
>>> */
>>> void nvme_override_prohibited_io_queues(struct nvme_ctrl *ctrl)
>>> {
>>> - if (nvme_admin_ctrl(ctrl))
>>> + if (nvme_admin_ctrl(ctrl) || nvme_discovery_ctrl(ctrl))
>>> ctrl->queue_count = 1;
>>> }
>>> EXPORT_SYMBOL_GPL(nvme_override_prohibited_io_queues);
>>
>> Repeating comment on patch 1. Can't we do this in nvme_init_subsystem() or may
>> be better, in nvme_set_queue_count() or nvme_init_ctrl_finish() ?
> nvme_set_queue_count() won’t even be called in this case, as its only used to
> configure IO queues, which are not being configured for an admin controller.
>
> If we move nvme_override_prohibited_io_queues() up the stack into either of your
> suggested core.c functions, it will affect apple & fc drivers, which I don’t have any
> means of testing. Any suggestions?
Why would the controller vendor or its fabric matter ?
If the controller type is admin or discovery, you want queue_count set to 1. So
I do not think there is any problem.
--
Damien Le Moal
Western Digital Research
Powered by blists - more mailing lists