Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp440370lqp; Wed, 22 May 2024 08:56:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUIt+MkTpxPFVN/hM/g7X9IrtBB7cZdM3arIprArJwE6cwfUO5nV0rFSWVkNAI9HNsEaO9niTIrFACF7wicy3Vg0QqhtGmwLJ3ut9PdZg== X-Google-Smtp-Source: AGHT+IHdTL+yU3rKrK/g8rDJcwp3GBvpUB63eQ+9Q6MxouLA9zA4e4DE94FhzvUywbJi/Iua5Evn X-Received: by 2002:a05:6902:4e2:b0:df4:e342:91da with SMTP id 3f1490d57ef6-df4e342a397mr2145544276.42.1716393407297; Wed, 22 May 2024 08:56:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716393407; cv=pass; d=google.com; s=arc-20160816; b=ctMniOaJLMfrTPjJynjJuNRbJRoXJ/mMj2vEFne11Ie3kuSyLN3i40sZHiJx8f8+J2 JDEU9Oo8KskeRXHrpndGTv796VDXri9YH2/bi65dJm4kLHJh5sUUbAnc7nTxOFXXzSyM B6NnpzUMjGPxkJVK77z4yEM1guhRYg62+vTCvZ7qd9fkVvc+AtHWStyFYwyQSUtRuqDJ bOfB2qxGXzLSnXAUiP0hKc9t/hNs475oKfgNninNTZm2SRWgR6i0VjWRTb875x22sj67 cxOFSe+lve6n9e7vuD8upaWzo8wC8EkRl8+meIGz2KVEp8eEYgfL/YmUOO7wxTG1lr4q iO5Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=5kdeKz62VCjZ2czxLUEdB36cemCi8WznUWnGc3QwAdM=; fh=ZKiFNvTamkgmLLvoXLBMOE7XpE4IoiKU7NODrPDjYGA=; b=i7EvNUN7JwM033tuKvqjw52MpvmH8Iywvx5MBXuN1AJj03+TIynFX5JfE2PgNGp6OC YGHyja9rtfMGVLbP6c8y6AS4slivfIv7kV2KyNTnXLddHdYz397KMmpWcqH3LFjDc1xM 7NnbhG9p13vBlZjJAyEmSS5ewSbWGa4UB3UdoZvccMdlI1L2R7iUpg3kWObSdABYSD/j qV9NM9ak196asYTWLvgoFCU23jRak8KuBaBNV836mq35OhX6OHmNgFIzWGtqWTK7xWDU DPtlvDpHJN1kDGL8VnTOQ60RJMzQH/YziTA8UydM/h0CWpjxDb/q+O90vNkvk405ZR8A 7Yqw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pLD0jpc6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-186468-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186468-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f304a0dsi104401006d6.556.2024.05.22.08.56.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 08:56:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-186468-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pLD0jpc6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-186468-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186468-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E7AED1C211EB for ; Wed, 22 May 2024 15:56:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C668313DBA0; Wed, 22 May 2024 15:56:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pLD0jpc6" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F0900210EC for ; Wed, 22 May 2024 15:56:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716393402; cv=none; b=hClv6DH1463HrQ7ZQJucAWwqnougBrx3rHC8K6Pa/SPV2Ua+TGLyT80RDrjPQJWKzFnXPHojHmsGzCo5VwRcamK/GKxWmgSUPqPVlgO5g+n1BH9frdvGi5xb+xExfsDDKPQiQ7egvA9wcMnf75x2bKe93896NgELHcF51pFq+FQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716393402; c=relaxed/simple; bh=v8cAZZ8J7bzfnYp5o6idecynXR7i2En6YomK8I+ZL6k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QcLeRf5Oy4q3RkKLzmKJNEu9nFj3uWxjgfj7noQbuPLye5kNvbrlDi9QmCVnH8TYi9Zvra7Z3tPsIwt3I//Q2tpG7xnvxWQr+5EqN2AA/tkq4mw4EvPIQYIn9MN3/+7wSalQAkzCa8hTW1PAoPpx0xeT/Ju129ssWOfnUIElN3g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pLD0jpc6; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4D94C2BD11; Wed, 22 May 2024 15:56:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716393401; bh=v8cAZZ8J7bzfnYp5o6idecynXR7i2En6YomK8I+ZL6k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pLD0jpc6QQLiSCCbEJeS+c7bGv0AsYyKFZKKbtw7cQcYIknJL1fcWPR1nAQOaha9z oj90/comP+41/pQqz2/wj5CvnrFTF5uQC0UNTxkUZAqgW0q1cR8Z3MY+IsA9aLbbmZ cvUOEP/gBVlbuVuPlIQR4qqx0iTloDgBs79fnz/MdQ/bHuc85GvC8LeRWH+uzqIQzo dhJStFVW+HggCYESP7xGiH2i+5p1grYKCuMq8W7YuzuWiyzt8FfJV6s2KRNJJW6btu ddOK2mZSKdYQi2qF79qYmKlBuSMycmJo7poUF62W6nXV9XOVNp/jO5K7RkEgUEehL6 6CPfgG9iDIigg== Date: Wed, 22 May 2024 09:56:38 -0600 From: Keith Busch To: John Meneghini 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" Message-ID: References: <20240522154212.643572-1-jmeneghi@redhat.com> <20240522154212.643572-2-jmeneghi@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240522154212.643572-2-jmeneghi@redhat.com> 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. > @@ -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.