[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <872f0ebd-124e-4a39-987c-ef9c273f1957@suse.de>
Date: Tue, 21 May 2024 16:23:53 +0200
From: Hannes Reinecke <hare@...e.de>
To: John Meneghini <jmeneghi@...hat.com>, kbusch@...nel.org, hch@....de,
sagi@...mberg.me, emilne@...hat.com
Cc: linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org,
jrani@...estorage.com, randyj@...estorage.com, hare@...nel.org
Subject: Re: [PATCH v3 1/1] nvme: multipath: Implemented new iopolicy
"queue-depth"
On 5/21/24 15:58, John Meneghini wrote:
> On 5/21/24 02:46, Hannes Reinecke wrote:
>> On 5/20/24 22:20, John Meneghini wrote:
>>> From: "Ewan D. Milne" <emilne@...hat.com>
>>>
> ...
>>> Tested-by: Marco Patalano <mpatalan@...hat.com>
>>> Reviewed-by: Randy Jennings <randyj@...hat.com>
>
> I need to fix this. Randy doesn't have a redhat.com email address... Cut
> an paste error :-(
>
>>> Tested-by: Jyoti Rani <jani@...estorage.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.
>
Please add a comment indicating that.
Just to make it clear that it's by design.
Cheers,
Hannes
Powered by blists - more mailing lists