From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 B950C152530 for ; Wed, 19 Jun 2024 16:35:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718814917; cv=none; b=X1WOYsa0FSxxt0C76/WFyAU8k7dFr0f/L7lSsPFOmT1NYqTT4qKHRp2dEvTK4nLmI3FAF56n9gnebX9oalz3Dgc664B2Zuw52PaVhgjq27nh/IenjGk6lBcqOxHVWd7YJ+br2zIUEnrCHhKJBvFt2zW1StxMH1V0/51hza+u/5o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718814917; c=relaxed/simple; bh=ZW6AYnIUR2Tan7flV9Fl/PqsyH9SR+aZP5aFP2a1LQ4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-type; b=C6PNFIdEBI09/Ys57Q7yYqzaIFfcVIDWquRq8mwpCGpl33n9DYLDu6chMpeckZVqOLY7IAruRZ3RDwbc2sJTRP6Z3q0QUDsYI6xuhMErAAJsVmfvqPQIuQjXl3/smPGGC5QudMqduvj5hUa5+Ma1EUgtdKSHztC0gtPNRxCvrhk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=NfC5iFd9; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NfC5iFd9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718814914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r2m/DNJOhv4IL+ZQkVkshtKTjE43+QNp6sZzmfrX6oc=; b=NfC5iFd9LBlcNvS4mpZ3oWxa+56B4qFUmUIExCA4E7Todyn48/gxNAJQKjU8K4ZX5w+pXg eKDfN3uOjc370Q96Hn6E2z8Hh0roomhNv2jt6et7OTA2WhyH2JsszEukEg0v1cFxYKpUUd E+VXzC8vFonTRvDItNvOe5JngZJz+aw= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-519-Y4Ypdd7fNY6RCLwWE0LHJg-1; Wed, 19 Jun 2024 12:35:11 -0400 X-MC-Unique: Y4Ypdd7fNY6RCLwWE0LHJg-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C43071956089; Wed, 19 Jun 2024 16:35:09 +0000 (UTC) Received: from jmeneghi-thinkpadp1gen3.rmtusnh.csb (unknown [10.22.33.177]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9C87A19560AF; Wed, 19 Jun 2024 16:35:07 +0000 (UTC) From: John Meneghini To: kbusch@kernel.org, hch@lst.de, sagi@grimberg.me Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, emilne@redhat.com, jmeneghi@redhat.com, jrani@purestorage.com, randyj@purestorage.com, chaitanyak@nvidia.com, hare@kernel.org Subject: [PATCH v7 0/1] nvme: queue-depth multipath iopolicy Date: Wed, 19 Jun 2024 12:35:02 -0400 Message-ID: <20240619163503.500844-1-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 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 I've addressed Chaitanya's and Hannes's review comments and retested everything. Test results can be seen at: https://github.com/johnmeneghini/iopolicy/tree/sample3 Please add this to nvme-6.11. Changes since V6: Cleanup tab formatting in nvme.h and removed extra white lines. Removed the results variable from nvme_mpath_end_request(). Changes since V5: Refactored nvme_find_path() to reduce the spaghetti code. Cleaned up all comments and reduced the total size of the diff, and fixed the commit message. Thomas Song now gets credit as the first author. Changes since V4: Removed atomic_set() from and return if (old_iopolicy == iopolicy) At the beginning of nvme_subsys_iopolicy_update(). Changes since V3: Addresssed all review comments, fixed the commit log, and moved nr_counter initialization from nvme_mpath_init_ctlr() to nvme_mpath_init_identify(). Changes since V2: Add the NVME_MPATH_CNT_ACTIVE flag to eliminate a READ_ONCE in the completion path and increment/decrement the active_nr count on all mpath IOs - including passthru commands. Send a pr_notice when ever the iopolicy on a subsystem is changed. This is important for support reasons. It is fully expected that users will be changing the iopolicy with active IO in progress. Squashed everything and rebased to nvme-v6.10 Changes since V1: I'm re-issuing Ewan's queue-depth patches in preparation for LSFMM These patches were first show at ALPSS 2023 where I shared the following graphs which measure the IO distribution across 4 active-optimized controllers using the round-robin verses queue-depth iopolicy. https://people.redhat.com/jmeneghi/ALPSS_2023/NVMe_QD_Multipathing.pdf Since that time we have continued testing these patches with a number of different nvme-of storage arrays and test bed configurations, and I've codified the tests and methods we use to measure IO distribution All of my test results, together with the scripts I used to generate these graphs, are available at: https://github.com/johnmeneghini/iopolicy Please use the scripts in this repository to do your own testing. These patches are based on nvme-v6.9 Thomas Song (1): nvme-multipath: implement "queue-depth" iopolicy drivers/nvme/host/core.c | 2 +- drivers/nvme/host/multipath.c | 103 +++++++++++++++++++++++++++++++--- drivers/nvme/host/nvme.h | 5 ++ 3 files changed, 101 insertions(+), 9 deletions(-) -- 2.45.1