From: Christoph Hellwig <hch@lst.de>
To: Surabhi Gogte <sgogte@purestorage.com>
Cc: Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
mkhalfella@purestorage.com, randyj@purestorage.com,
adailey@purestorage.com
Subject: Re: [PATCH v3 2/2] nvme-rdma: parallelize I/O queue allocation and startup
Date: Fri, 26 Jun 2026 09:40:04 +0200 [thread overview]
Message-ID: <20260626074004.GB12072@lst.de> (raw)
In-Reply-To: <20260625212722.1302344-3-sgogte@purestorage.com>
On Thu, Jun 25, 2026 at 03:27:22PM -0600, Surabhi Gogte wrote:
> -static int nvme_rdma_alloc_io_queues(struct nvme_rdma_ctrl *ctrl)
> +static int nvme_rdma_setup_io_queues(struct nvme_rdma_ctrl *ctrl, unsigned int first,
Overly long line.
> + unsigned int last, size_t queue_size)
> {
> + ASYNC_DOMAIN_EXCLUSIVE(queue_domain);
> + struct nvme_rdma_setup_ctx *ctxs;
> + int nr_queues = last - first;
> + int err = 0, i, ret;
>
> + ctxs = kmalloc_array(nr_queues, sizeof(*ctxs), GFP_KERNEL);
This should use kmalloc_objs in the brave new world.
> + if (!ctxs)
> return -ENOMEM;
>
> + for (i = 0; i < nr_queues; i++) {
> + struct nvme_rdma_queue *queue = &ctrl->queues[first + i];
> +
> + queue->ctrl = ctrl;
> + queue->queue_size = queue_size;
> +
> + ctxs[i].queue = queue;
> + ctxs[i].err = &err;
> + async_schedule_domain(nvme_rdma_setup_queue_async, &ctxs[i],
> + &queue_domain);
> }
>
> + async_synchronize_full_domain(&queue_domain);
> + kfree(ctxs);
It would nice if the async domain had a way to do the error propagation.
Well, that would be a nice follow on if you're interested.
Talking about follow ons: do you plan to do a similar change
to nvme-tcp? It would be great to keep the setup path for
both in sync.
next prev parent reply other threads:[~2026-06-26 7:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-25 21:27 [PATCH v3 0/2] nvme-rdma: parallelize I/O queue setup Surabhi Gogte
2026-06-25 21:27 ` [PATCH v3 1/2] nvme-rdma: refactor nvme_rdma_alloc_queue() to take a queue pointer Surabhi Gogte
2026-06-26 7:34 ` Christoph Hellwig
2026-06-25 21:27 ` [PATCH v3 2/2] nvme-rdma: parallelize I/O queue allocation and startup Surabhi Gogte
2026-06-26 7:40 ` Christoph Hellwig [this message]
2026-06-27 4:26 ` Surabhi Gogte (she/her)
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=20260626074004.GB12072@lst.de \
--to=hch@lst.de \
--cc=adailey@purestorage.com \
--cc=axboe@kernel.dk \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=mkhalfella@purestorage.com \
--cc=randyj@purestorage.com \
--cc=sagi@grimberg.me \
--cc=sgogte@purestorage.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