public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: Daniel Wagner <dwagner@suse.de>,
	"lsf-pc@lists.linux-foundation.org"
	<lsf-pc@lists.linux-foundation.org>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Subject: Re: [LSF/MM/BPF TOPIC] nvme state machine refactoring
Date: Thu, 27 Apr 2023 08:42:34 +0000	[thread overview]
Message-ID: <9adc17de-5159-94bd-abd5-e52a09e9e3d3@nvidia.com> (raw)
In-Reply-To: <dkxas4hwmnzknde7csbnuxwtk6odsaptj34hj7ukz4kh54h45n@6aiz7ghuf7ej>

On 4/27/23 00:27, Daniel Wagner wrote:
> Hi,
>
> I'd like to use the opportunity to align and discuss the nvme state machine
> refactoring work in person. I don't think we need a lot of time for this topic,
> so if we could just have the topic during a BOF it would be great.
>
> Sagi proposed following high level API:
>
>    ops.setup_transport(ctrl)
>    ops.alloc_admin_queue(ctrl)
>    ops.start_admin_queue(ctrl)
>    ops.stop_admin_queue(ctrl)
>    ops.free_admin_queue(ctrl)
>    ops.alloc_io_queues(ctrl)
>    ops.start_io_queues(ctrl)
>    ops.stop_io_queues(ctrl)
>    ops.free_io_queues(ctrl)
>
> Getting the queue functions done is fairly straight forward and I didn't run
> into any problems in my experiments.
>
> The more tricky part is the slight different behavior how the transports handle
> how many queues are allocated for IO and their placement. To keep it exactly as
> it is right now, I had to add a couple of additional callbacks aside to
> setup_transport():
>
>   - nr_io_queues(): limit the number of queues
>   - set_io_queues(): map the queues to cpu
>
> The first one was mainly necessary for rdma but IIRC Keith has done some work
> there which could make the callback unnecessary. My question is should we try
> to unify this part as well?
>
> Also I haven't really checked what pci does here.
>
> The second callback should probably be replaced with something which is also
> executed during runtime, e.g. for CPU hotplug events. I don't think it is
> strictly necessary. At least it looks a bit suspicious that we only do the queue
> cpu mapping when (re)connecting. But maybe I am just missing something.
>
> There is also the question how to handle the flags set by the core and the one
> set the the transports. There are generic ones like NVME_TCP_Q_LIVE. These can
> be translated into generic ones, so fairly simple. Though here is one transport
> specific one in rdma: NVME_RDMA_Q_TR_READY. What to do here?
>
> In short, I don't think there are real blockers. The main question for me is, do
> we want to unify all transport so far that they act exactly the same?
>
> Required Attendees:
>    - Chaitanya Kulkarni
>    - Christoph Hellwig
>    - Hannes Reinecke
>    - James Smart
>    - Keith Busch
>    - Sagi Grimberg
>
> Anyway, I think it is necessary to have tests in blktests up front. Hence my
> current effort with enabling fc transport in blktests.
>
> Thanks,
> Daniel
>
> https://lore.kernel.org/linux-nvme/20230301082737.10021-1-dwagner@suse.de/
> https://lore.kernel.org/linux-nvme/20230306093244.20775-1-dwagner@suse.de/
>

good idea, in order to make the discussion more interesting and productive.
Could you please share the latest code LSFMM so that everyone can go through
it?

-ck



  reply	other threads:[~2023-04-27  8:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-27  7:27 [LSF/MM/BPF TOPIC] nvme state machine refactoring Daniel Wagner
2023-04-27  8:42 ` Chaitanya Kulkarni [this message]
2023-05-03 13:55   ` Daniel Wagner

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=9adc17de-5159-94bd-abd5-e52a09e9e3d3@nvidia.com \
    --to=chaitanyak@nvidia.com \
    --cc=dwagner@suse.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    /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