From: John Meneghini <jmeneghi@redhat.com>
To: Keith Busch <kbusch@kernel.org>
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 12:23:51 -0400 [thread overview]
Message-ID: <cef5a764-ffab-495c-bea2-e4c6a7c76944@redhat.com> (raw)
In-Reply-To: <Zk4VtiCjeqkBKCBA@kbusch-mbp.dhcp.thefacebook.com>
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....
>> @@ -1061,6 +1066,9 @@ static inline bool nvme_disk_is_ns_head(struct gendisk *disk)
>> {
>> return false;
>> }
>> +static inline void nvme_subsys_iopolicy_update(struct nvme_subsystem *subsys, int iopolicy)
>> +{
>> +}
>> #endif /* CONFIG_NVME_MULTIPATH */
>
> You can remove this stub function since the only caller resides in a
> CONFIG_NVME_MULTIPATH file.
>
I can do that. Since I have to spin a version 5 patch, do you want me to make the change above?
Is there anything else?
/John
next prev parent reply other threads:[~2024-05-22 16:23 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 [this message]
2024-05-22 16:29 ` Keith Busch
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=cef5a764-ffab-495c-bea2-e4c6a7c76944@redhat.com \
--to=jmeneghi@redhat.com \
--cc=emilne@redhat.com \
--cc=hare@kernel.org \
--cc=hch@lst.de \
--cc=jrani@purestorage.com \
--cc=kbusch@kernel.org \
--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®