From patchwork Mon Jul 1 21:49:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Jiang X-Patchwork-Id: 13718668 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 E115A2C1BA; Mon, 1 Jul 2024 21:50:22 +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=1719870622; cv=none; b=gHHEnzVJxu9iIKFg+gOy9/K4vb/7aZOdVyMKFPP+cBTPxYcMy+bR5jqfbY7tNDHZFWVbSxF/f/Pej+lRzhdGaXZ8ebjSJ+pm9V0fT3UtzyMbYpIh+aLDxDdDW3g0XyO0TDe4pKe71Rui4sBFhA/CroRSG4WPsANbv8LLPwK0xDg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719870622; c=relaxed/simple; bh=1No+RehntL8i97yFgG0xqOB1/dapQSlfQDkzPdig/n8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=p8u5gVAzJsgJnO4fFWWnVueFuhjM1Lcanyev2uYLSSFwWvnBSCVe44iqjhldxhhwT2U9Qiwa8S3+RipWvxutQkEgw5AWj6srHmFvLIZPE9KUrcaYp4hAvX77odo305MsqyLYjZom27OUpOiXsJyOr0bsDJSZnFKI9Oa2eXaY7hQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D7F3C116B1; Mon, 1 Jul 2024 21:50:22 +0000 (UTC) From: Dave Jiang To: linux-cxl@vger.kernel.org, linux-pci@vger.kernel.org Cc: dan.j.williams@intel.com, ira.weiny@intel.com, vishal.l.verma@intel.com, alison.schofield@intel.com, Jonathan.Cameron@huawei.com, dave@stgolabs.net Subject: [PATCH v6 0/2] cxl: Region bandwidth calculation for targets with shared upstream link Date: Mon, 1 Jul 2024 14:49:13 -0700 Message-ID: <20240701215020.3813275-1-dave.jiang@intel.com> X-Mailer: git-send-email 2.45.1 Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 v6: - Update kdoc in comments. (Ira) - Various rearranging and cleanup of variable declarations. (Jonathan) This series provides recalculation of the CXL region bandwidth when the targets have shared upstream link by walking the toplogy from bottom up and clamp the bandwdith as the code traverses up the tree. An example topology: An example topology from Jonathan: CFMWS 0 | _________|_________ | | ACPI0017-0 ACPI0017-1 GP0/HB0/ACPI0016-0 GP1/HB1/ACPI0016-1 | | | | RP0 RP1 RP2 RP3 | | | | SW 0 SW 1 SW 2 SW 3 | | | | | | | | EP0 EP1 EP2 EP3 EP4 EP5 EP6 EP7 Computation for the example topology: Min (GP0 to CPU BW, Min(SW 0 Upstream Link to RP0 BW, Min(SW0SSLBIS for SW0DSP0 (EP0), EP0 DSLBIS, EP0 Upstream Link) + Min(SW0SSLBIS for SW0DSP1 (EP1), EP1 DSLBIS, EP1 Upstream link)) + Min(SW 1 Upstream Link to RP1 BW, Min(SW1SSLBIS for SW1DSP0 (EP2), EP2 DSLBIS, EP2 Upstream Link) + Min(SW1SSLBIS for SW1DSP1 (EP3), EP3 DSLBIS, EP3 Upstream link))) + Min (GP1 to CPU BW, Min(SW 2 Upstream Link to RP2 BW, Min(SW2SSLBIS for SW2DSP0 (EP4), EP4 DSLBIS, EP4 Upstream Link) + Min(SW2SSLBIS for SW2DSP1 (EP5), EP5 DSLBIS, EP5 Upstream link)) + Min(SW 3 Upstream Link to RP3 BW, Min(SW3SSLBIS for SW3DSP0 (EP6), EP6 DSLBIS, EP6 Upstream Link) + Min(SW3SSLBIS for SW3DSP1 (EP7), EP7 DSLBIS, EP7 Upstream link))))