Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3132410yba; Mon, 22 Apr 2019 20:53:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqyJEYTSdWtpyeAT4GxgLQRa8Or3X3j5r2CfDizrPKBD4gXhOQ1wsz1zACBO6zmtPMpyo1YW X-Received: by 2002:a62:14d7:: with SMTP id 206mr24243355pfu.162.1555991628117; Mon, 22 Apr 2019 20:53:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555991628; cv=none; d=google.com; s=arc-20160816; b=r8TilyMIbEdoI8sXRDB4U2Lotwzi7syqtWSj5nbH3fL11LvbEcTrQHGsSHtTLZXP6d 6FoVr8gTsXy1ZRtAw0ngyKfsSF5dsO4IgvS4OAAkx1f6HyPiolvxJgwhXZt5obZ1wdvU /auQLAmNpChD42tdy5tMhx3MOsqDOTl5PxBiskhonftJhipUK1Ulm8sK7oOPnpF7Px19 98qVcYk+NxGVVIPgvmAsWoY7mSvbP3icIp9PTvBrXZ4Kz/0TtLp+Fy/R6vP7x82SpgWp I8CUe+KK6LDwPg6Xhi+Cwg11HnMj7GxK54i00pkuY7CQwjkf7hrDiIPfdhPGMODlSshf bICw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=GlbPutO3CKKc8LgqFEKPoLdLQrZCI+8seaF38ZCMOSY=; b=DL8NcUvepKrEUt/345bAmh3WRJCdRTHPmdiJU2CKwNNp5Iam6rXBcmSocFaeoiYncI cZ95mpbl9B3WyHz8bAELFLODX+QTnwIidGTewdeDW+hjKP2h79DcY2yKOSA3SpUaABGt 1Qh2c52Zy7Zk3E22C9c0tQjqK28NeroSyhTosVpdmlY82hgxsoysZhWQqq9tFwO16Czq E2Ck8k4+oAjlV8bKdcfUUAazXdl14m0nIe8jYIDuMMLIsFLKZeBiLbZsNdWazSuYRIR0 hMJ18/7fVcTG57jC87rS9Oz+cyF9vNwQUFgKUrdsFvaicu9pL4JHXnBy9tqzbmdXiFJy sz6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3si14750419plo.243.2019.04.22.20.53.33; Mon, 22 Apr 2019 20:53:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731011AbfDWAdt (ORCPT + 99 others); Mon, 22 Apr 2019 20:33:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57162 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729321AbfDWAdt (ORCPT ); Mon, 22 Apr 2019 20:33:49 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1796B58E33; Tue, 23 Apr 2019 00:33:49 +0000 (UTC) Received: from x1.home (ovpn-116-122.phx2.redhat.com [10.3.116.122]) by smtp.corp.redhat.com (Postfix) with ESMTP id 17D89608A4; Tue, 23 Apr 2019 00:33:48 +0000 (UTC) Date: Mon, 22 Apr 2019 18:33:47 -0600 From: Alex Williamson To: Alex G Cc: bhelgaas@google.com, helgaas@kernel.org, linux-pci@vger.kernel.org, austin_bolen@dell.com, alex_gagniuc@dellteam.com, keith.busch@intel.com, Shyam_Iyer@Dell.com, lukas@wunner.de, okaya@kernel.org, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] PCI/LINK: Account for BW notification in vector calculation Message-ID: <20190422183347.51ba522c@x1.home> In-Reply-To: References: <155597243666.19387.1205950870601742062.stgit@gimli.home> Organization: Red Hat MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 23 Apr 2019 00:33:49 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 22 Apr 2019 19:05:57 -0500 Alex G wrote: > On 4/22/19 5:43 PM, Alex Williamson wrote: > > [ 329.725607] vfio-pci 0000:07:00.0: 32.000 Gb/s available PCIe bandwidth, > > limited by 2.5 GT/s x16 link at 0000:00:02.0 (capable of 64.000 Gb/s with 5 > > GT/s x16 link) > > [ 708.151488] vfio-pci 0000:07:00.0: 32.000 Gb/s available PCIe bandwidth, > > limited by 2.5 GT/s x16 link at 0000:00:02.0 (capable of 64.000 Gb/s with 5 > > GT/s x16 link) > > [ 718.262959] vfio-pci 0000:07:00.0: 32.000 Gb/s available PCIe bandwidth, > > limited by 2.5 GT/s x16 link at 0000:00:02.0 (capable of 64.000 Gb/s with 5 > > GT/s x16 link) > > [ 1138.124932] vfio-pci 0000:07:00.0: 32.000 Gb/s available PCIe bandwidth, > > limited by 2.5 GT/s x16 link at 0000:00:02.0 (capable of 64.000 Gb/s with 5 > > GT/s x16 link) > > > > What is the value of this nagging? > > Good! The bandwidth notification service is working as intended. If this > bothers you, you can unbind the device from the bandwidth notification > driver: > > echo 0000:07:00.0:pcie010 | > sudo tee /sys/bus/pci_express/drivers/pcie_bw_notification/unbind That's a bad solution for users, this is meaningless tracking of a device whose driver is actively managing the link bandwidth for power purposes. There is nothing wrong happening here that needs to fill logs. I thought maybe if I enabled notification of autonomous bandwidth changes that it might categorize these as something we could ignore, but it doesn't. How can we identify only cases where this is an erroneous/noteworthy situation? Thanks, Alex > > diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c > > index 7d04f9d087a6..1b330129089f 100644 > > --- a/drivers/pci/pcie/portdrv_core.c > > +++ b/drivers/pci/pcie/portdrv_core.c > > @@ -55,7 +55,8 @@ static int pcie_message_numbers(struct pci_dev *dev, int mask, > > * 7.8.2, 7.10.10, 7.31.2. > > */ > > > > - if (mask & (PCIE_PORT_SERVICE_PME | PCIE_PORT_SERVICE_HP)) { > > + if (mask & (PCIE_PORT_SERVICE_PME | PCIE_PORT_SERVICE_HP | > > + PCIE_PORT_SERVICE_BWNOTIF)) { > > pcie_capability_read_word(dev, PCI_EXP_FLAGS, ®16); > > *pme = (reg16 & PCI_EXP_FLAGS_IRQ) >> 9; > > nvec = *pme + 1; > > Good catch!