mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Surabhi Gogte <sgogte@purestorage.com>
Cc: axboe@kernel.dk, hch@lst.de, sagi@grimberg.me,
	linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
	mkhalfella@purestorage.com, randyj@purestorage.com
Subject: Re: [PATCH v2] nvme-rdma: parallelize I/O queue allocation and startup
Date: Tue, 9 Jun 2026 14:07:33 -0600	[thread overview]
Message-ID: <aihyhdXtMyn2_T7v@kbusch-mbp> (raw)
In-Reply-To: <20260604195321.2232838-1-sgogte@purestorage.com>

On Thu, Jun 04, 2026 at 01:53:21PM -0600, Surabhi Gogte wrote:
> Refactor nvme rdma I/O queue setup to use async API, combining
> allocation and startup into a single parallel operation per queue. This
> reduces connection and reconnection setup time when there are delays in
> establishing connections, which is especially important for
> high-core-count hosts.

Mostly looks fine.

> @@ -16,6 +16,7 @@
>  #include <linux/types.h>
>  #include <linux/list.h>
>  #include <linux/mutex.h>
> +#include <linux/async.h>
>  #include <linux/scatterlist.h>
>  #include <linux/nvme.h>
>  #include <linux/unaligned.h>
> @@ -125,6 +126,7 @@ struct nvme_rdma_ctrl {
>  	struct nvme_ctrl	ctrl;
>  	bool			use_inline_data;
>  	u32			io_queues[HCTX_MAX_TYPES];
> +	atomic_t		qsetup_err;
>  };

This new field serves only to propogate an error from a local context,
so I don't want to introduce a new field for it at this scope. I prefer
you declare a special context struct for it to use with the async usage:

struct nvme_rdma_setup_ctx {
	struct nvme_rdma_queue  *queue;
	int                     *err;
};

And then make that the cookie passed to the async setup. I don't think
it needs to be atomic here either: we really don't care if we see the
first or last error, so forcing a cmpxchg for the first one is a bit
overkill; you can just do READ/WRITE_ONCE instead and accept the race.

  reply	other threads:[~2026-06-09 20:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-04 19:53 Surabhi Gogte
2026-06-09 20:07 ` Keith Busch [this message]
2026-06-25 20:57   ` Surabhi Gogte (she/her)
2026-06-10 12:04 ` Christoph Hellwig
2026-06-25 21:04   ` 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=aihyhdXtMyn2_T7v@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --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

all inboxes | Powered by JetHome®