Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: John Meneghini <jmeneghi@redhat.com>
To: Hannes Reinecke <hare@suse.de>,
	kbusch@kernel.org, hch@lst.de, sagi@grimberg.me,
	emilne@redhat.com
Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
	jrani@purestorage.com, randyj@purestorage.com, hare@kernel.org
Subject: Re: [PATCH v3 1/1] nvme: multipath: Implemented new iopolicy "queue-depth"
Date: Tue, 21 May 2024 09:58:31 -0400	[thread overview]
Message-ID: <595e5988-b94d-41ba-a233-f87aed55028d@redhat.com> (raw)
In-Reply-To: <f808fa46-e7c7-48e6-8c80-3d28efd0afec@suse.de>

On 5/21/24 02:46, Hannes Reinecke wrote:
> On 5/20/24 22:20, John Meneghini wrote:
>> From: "Ewan D. Milne" <emilne@redhat.com>
>>
...
>> Tested-by: Marco Patalano <mpatalan@redhat.com>
>> Reviewed-by: Randy Jennings <randyj@redhat.com>

I need to fix this. Randy doesn't have a redhat.com email address... Cut an paste error :-(

>> Tested-by: Jyoti Rani <jani@purestorage.com>
>> 
...
>> +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);
>> +
>> +    mutex_lock(&nvme_subsystems_lock);
>> +    list_for_each_entry(ctrl, &subsys->ctrls, subsys_entry) {
>> +        atomic_set(&ctrl->nr_active, 0);
>> +        nvme_mpath_clear_ctrl_paths(ctrl);
> 
> You always reset the variables here, even if specified iopolicy is
> the same than the currently active one.
> I'd rather check if the iopolicy is different before changing the settings.

Yes, Keith pointed this out too.  This is actually a feature not a bug.  In situations were we want to "reset" the nr_active 
counters on all controllers the user can simply set the queue-depth iopolicy a second time.  I don't expect users to do this 
very often... they shouldn't be changing IO policies back and forth too much... but the ability to "reset" the nr_active 
counters during testing has been very helpful and important to do.  So I'd like to keep this.  Moreover, this is NOT the 
performance path. I don't see the point in making performance optimizations in a code path that is run once a year.

/John



  reply	other threads:[~2024-05-21 15:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-20 20:20 [PATCH v3 0/1] nvme: queue-depth multipath iopolicy John Meneghini
2024-05-20 20:20 ` [PATCH v3 1/1] nvme: multipath: Implemented new iopolicy "queue-depth" John Meneghini
2024-05-20 20:50   ` Keith Busch
2024-05-21 14:20     ` John Meneghini
2024-05-21  6:46   ` Hannes Reinecke
2024-05-21 13:58     ` John Meneghini [this message]
2024-05-21 14:10       ` Keith Busch
2024-05-21 14:23       ` Hannes Reinecke
2024-05-21 16:35       ` Caleb Sander
2024-05-21  8:48   ` Nilay Shroff
2024-05-21  9:45     ` Sagi Grimberg
2024-05-21 10:07       ` Nilay Shroff
2024-05-21 10:11         ` Sagi Grimberg
2024-05-21 10:15           ` Sagi Grimberg
2024-05-21 10:16             ` Sagi Grimberg
2024-05-21 14:44               ` John Meneghini
2024-05-22 10:48                 ` Nilay Shroff
2024-05-22 10:52                   ` Sagi Grimberg
2024-05-22 13:12                   ` John Meneghini
2024-05-21 10:22             ` Nilay Shroff
2024-05-21 13:05     ` Keith Busch

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=595e5988-b94d-41ba-a233-f87aed55028d@redhat.com \
    --to=jmeneghi@redhat.com \
    --cc=emilne@redhat.com \
    --cc=hare@kernel.org \
    --cc=hare@suse.de \
    --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