From: Keith Busch <kbusch@kernel.org>
To: John Meneghini <jmeneghi@redhat.com>
Cc: hch@lst.de, sagi@grimberg.me, emilne@redhat.com,
linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
jrani@purestorage.com, randyj@purestorage.com, hare@kernel.org
Subject: Re: [PATCH v4 1/1] nvme: multipath: Implemented new iopolicy "queue-depth"
Date: Wed, 22 May 2024 10:29:40 -0600 [thread overview]
Message-ID: <Zk4ddPmottdOJND1@kbusch-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <cef5a764-ffab-495c-bea2-e4c6a7c76944@redhat.com>
On Wed, May 22, 2024 at 12:23:51PM -0400, John Meneghini wrote:
> On 5/22/24 11:56, Keith Busch wrote:
> > On Wed, May 22, 2024 at 11:42:12AM -0400, John Meneghini wrote:
> > > +static void nvme_subsys_iopolicy_update(struct nvme_subsystem *subsys, int iopolicy)
> > > +{
> > > + struct nvme_ctrl *ctrl;
> > > + int old_iopolicy = READ_ONCE(subsys->iopolicy);
> > > +
> > > + WRITE_ONCE(subsys->iopolicy, iopolicy);
> > > +
> > > + /* iopolicy changes reset the counters and clear the mpath by design */
> > > + mutex_lock(&nvme_subsystems_lock);
> > > + list_for_each_entry(ctrl, &subsys->ctrls, subsys_entry) {
> > > + atomic_set(&ctrl->nr_active, 0);
> >
> > Can you me understand why this is a desirable feature? Unless you
> > quiesce everything at some point, you'll always have more unaccounted
> > requests on whichever path has higher latency. That sounds like it
> > defeats the goals of this io policy.
>
> This is true. And as a matter of practice I never change the IO policy when IOs are in flight. I always stop the IO first.
> But we can't stop any user from changing the IO policy again and again. So I'm not sure what to do.
>
> If you'd like I add the 'if (old_iopolicy == iopolicy) return;' here, but
> that's not going to solve the problem of inaccurate counters when users
> start flipping io policies around. with IO inflight. There is no
> synchronization between io submission across controllers and changing the
> policy so I expect changing between round-robin and queue-depth with IO
> inflight suffers from the same problem... though not as badly.
>
> I'd rather take this patch now and figure out how to fix the problem with
> another patch in the future. Maybe we can check the io stats and refuse to
> change the policy of they are not zero....
The idea of tagging the nvme_req()->flags on submission means the
completion handling the nr_active counter is symmetric with the
submission side: you don't ever need to reset nr_active because
everything is accounted for.
next prev parent reply other threads:[~2024-05-22 16:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-22 15:42 [PATCH v4 0/1] nvme: queue-depth multipath iopolicy John Meneghini
2024-05-22 15:42 ` [PATCH v4 1/1] nvme: multipath: Implemented new iopolicy "queue-depth" John Meneghini
2024-05-22 15:56 ` Keith Busch
2024-05-22 16:23 ` John Meneghini
2024-05-22 16:29 ` Keith Busch [this message]
2024-05-23 10:02 ` Sagi Grimberg
2024-05-23 6:23 ` Hannes Reinecke
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=Zk4ddPmottdOJND1@kbusch-mbp.dhcp.thefacebook.com \
--to=kbusch@kernel.org \
--cc=emilne@redhat.com \
--cc=hare@kernel.org \
--cc=hch@lst.de \
--cc=jmeneghi@redhat.com \
--cc=jrani@purestorage.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=randyj@purestorage.com \
--cc=sagi@grimberg.me \
/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®