Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp536899rdb; Thu, 2 Nov 2023 10:28:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFdYAarOiDSLyRV9j30SESrtZPUhMLZGOFleP1wcNlHC1WMP38I+uKQtuWa+PE9hTfEbgko X-Received: by 2002:a17:902:f7cb:b0:1bd:e258:a256 with SMTP id h11-20020a170902f7cb00b001bde258a256mr468422plw.32.1698946122428; Thu, 02 Nov 2023 10:28:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698946122; cv=none; d=google.com; s=arc-20160816; b=KL9hLaGfJsKQQzTVAI1OOekgPKGZqhC6fZBFeIyQvtiBhO2KeNdjDllweDZZk0a9T9 WgWui7SC0q/ODIgWmPy6gRJG7/XCQCPkMAZCDpbcW7a4Zcx7K8W4O1LMuoNStO0zZ8bm F62QSPmk5mCBRgM6YXDpM3AouKZwH/DBkh7+cD/QzCovln4ju++ytzAAyPR9KRnn4AUI 1rzq+h5uVQnRrNYyt9qe2gEQ2oN4o1ruEv89tWK1nnD3bkF+DnrkRIpGeHnYP/7Gvah4 KZegqLpWdSdA2vyIPUpJE/Jy2gkz0PezhWNi07mZbFR/WI66mimC8lnfVa6BLTMGzalN 4spg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=iBBzPOURrycuuj7uftqWNBV8Pt3T+Y5KsL4nlDO1pF0=; fh=safXjgvxYJ6v7OxKipaXAmBFXq1/oLGFyBKu8JWmkyA=; b=kxapEs2Ia4CsLOtTM3cCYt0l6R868zTIM9ULm/1X87APr4tEdAiAnJBVtBeSPysMGl ogWZEjbwjyOjqk/XxxyNYW4jR3vvIdDEoWY7fUTyLSDgzF9rj3vISnZ1bLh/hoWMoR4V SA6QuvfSzjK5TJIEZm8QQ5XBOMOMosmgjVPQDnLiWMy+qXa5P107DmtTKrSBFLfLOt9d KmoCTDudqUB+kY1FmRc9mbd2obBDXCBrzPlvbTHuubUw85coAGH/gcNj7O6X4A/5frjU PpZRAgzgNGvdnO5ibir1zFqoZxwBXe94CRTvVBwnSBnuZmzDiOFs3FFf9h3D+QUk8MB1 yj+w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id ix19-20020a170902f81300b001c9bdaa81e3si7138plb.633.2023.11.02.10.28.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 10:28:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 5541682A38D7; Thu, 2 Nov 2023 10:28:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231518AbjKBR2g (ORCPT + 99 others); Thu, 2 Nov 2023 13:28:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231339AbjKBR2f (ORCPT ); Thu, 2 Nov 2023 13:28:35 -0400 X-Greylist: delayed 6882 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 02 Nov 2023 10:28:29 PDT Received: from bmailout2.hostsharing.net (bmailout2.hostsharing.net [IPv6:2a01:37:3000::53df:4ef0:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83AA4182; Thu, 2 Nov 2023 10:28:29 -0700 (PDT) Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL Global TLS RSA4096 SHA256 2022 CA1" (verified OK)) by bmailout2.hostsharing.net (Postfix) with ESMTPS id BD6472800A286; Thu, 2 Nov 2023 18:28:27 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id A78522E5C18; Thu, 2 Nov 2023 18:28:27 +0100 (CET) Date: Thu, 2 Nov 2023 18:28:27 +0100 From: Lukas Wunner To: Bjorn Helgaas Cc: Mario Limonciello , bhelgaas@google.com, mika.westerberg@linux.intel.com, andreas.noever@gmail.com, michael.jamet@intel.com, YehezkelShB@gmail.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Alexander.Deucher@amd.com Subject: Re: [PATCH 2/2] PCI: Ignore PCIe ports used for tunneling in pcie_bandwidth_available() Message-ID: <20231102172827.GA8677@wunner.de> References: <928df647-5b20-406b-8da5-3199f5cfbb48@amd.com> <20231102154748.GA122230@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231102154748.GA122230@bhelgaas> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 02 Nov 2023 10:28:41 -0700 (PDT) On Thu, Nov 02, 2023 at 10:47:48AM -0500, Bjorn Helgaas wrote: > On Wed, Nov 01, 2023 at 08:14:31PM -0500, Mario Limonciello wrote: > > On 11/1/2023 17:52, Bjorn Helgaas wrote: > > > Is the implication that a tunneling port can *never* be a speed > > > bottleneck? That seems to be how this patch would work in practice. > > > > I think that's a stretch we should avoid concluding. > > I'm just reading the description and the patch, which seem to say that > pcie_bandwidth_available() will never report a tunneling port as the > limiting port. If the Thunderbolt host controller is a discrete chip attached with PCIe, the bandwidth is capped by its Switch Upstream Port. E.g. the "Light Ridge" Thunderbolt 1 controller's Switch Upstream Port supports 5 GT/s at x4 width. In contemporary systems, the Thunderbolt controller is often part of the CPU SoC, so attached Thunderbolt devices appear below a Root Port. In that case, there's no such limitation. Additionally the bandwidth is limited by the Thunderbolt generation: Thunderbolt 1 had two bidirectional 10 GBit/s channels, Thunderbolt 2 has 20 GBit/s total, Thunderbolt 3 & 4 has 40 GBit/s total: https://en.wikipedia.org/wiki/Thunderbolt_(interface) Hence assuming "unlimited" capacity for Thunderbolt wouldn't be accurate. Thanks, Lukas