Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3914483yba; Tue, 23 Apr 2019 11:39:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqxKJt1sKEMKJPUgFK9JokfmtCJgEd8Rcmi2hyhQ9Xb02SAesi9kXK2WOrVVjRZluvXvaO6L X-Received: by 2002:a17:902:f81:: with SMTP id 1mr27759459plz.216.1556044778860; Tue, 23 Apr 2019 11:39:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556044778; cv=none; d=google.com; s=arc-20160816; b=sOIYpaCZkY5TQR418BvaAzti1//FtCdGfz/CUF0N2wmCMKA+vU2HCdpOG8AhK5zBd+ Ekki4zhZU9V5kRXac9nA6YGnFYOfCHtwlO4xO5611FOVvNcIJiSaH/JOxJmjc2ffpOIm +SULcsuFQgLvXn8Qd8A/USvbrNGgWUMSIvlbt//iKFByEa9jT/g7834pitoZkzw3pbGo vEBgcF5sc5ut6SdIsOK0v2ed+lfWsBpI75NOMKV6vpHyK3xSLXn1BUDvwVaxwGwmLegU 1QXAtMwDH8Uz5cfSmGo8mmleWsOjL07UEONmk2rftLyd8QT4ancwmat0EXofH6dwUDvA XcFw== 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=3g0hcCC7+ybSHrvwyJ7AMBDfVq7kRhBhbvNjLRQziLs=; b=AdtZ5HWE6VQMDtYw8EsZG5mYZkiO244y10nv6l/lyttCpmh3JM4F1553bz/Fwsd1l4 GF6cSzNqqzzkTKyZwEV1QQTh9wg0zssX7jXCWFu6fwvbfjh7wThF/iCHR5WMieTrXruJ 7FwjPDp0zDc59qfpADkgcXQgq2T8EuKUYHlJ3kO+86RFWi76EgUN3usGn975We6nBtVT tiT0AvkDX8dIAnw2z0LNLsgmijepb/xWw9n3FoX6iHMqgO1M7mdwXvqJVMllxYnaauQS ij2MZFu3W9m+ere5d2LqnPZrAhg+ukSkJ2zDSltM3taCfZy2hWeSChmiVFMrr9ymoooM 3m8A== 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 t15si16072892pgq.235.2019.04.23.11.39.23; Tue, 23 Apr 2019 11:39:38 -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 S1726579AbfDWSib (ORCPT + 99 others); Tue, 23 Apr 2019 14:38:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60136 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726074AbfDWSia (ORCPT ); Tue, 23 Apr 2019 14:38:30 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 29A4C319937A; Tue, 23 Apr 2019 18:38:30 +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 4C6B816BE5; Tue, 23 Apr 2019 18:38:29 +0000 (UTC) Date: Tue, 23 Apr 2019 12:38:28 -0600 From: Alex Williamson To: Alex G Cc: Bjorn Helgaas , 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: <20190423123828.691bb37c@x1.home> In-Reply-To: <9802ef46-40d2-b83c-a0c6-8bd6ac25feaa@gmail.com> References: <155597243666.19387.1205950870601742062.stgit@gimli.home> <20190422183347.51ba522c@x1.home> <84300da7-9bbd-4f32-c7fa-23724db60b88@gmail.com> <20190423171050.GA37199@google.com> <9802ef46-40d2-b83c-a0c6-8bd6ac25feaa@gmail.com> Organization: Red Hat MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Tue, 23 Apr 2019 18:38:30 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 23 Apr 2019 12:53:07 -0500 Alex G wrote: > On 4/23/19 12:10 PM, Bjorn Helgaas wrote: > > On Tue, Apr 23, 2019 at 09:33:53AM -0500, Alex G wrote: > >> On 4/22/19 7:33 PM, Alex Williamson wrote: > >>> 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, > >> > >> You don't. Ethernet doesn't. USB doesn't. This logging behavior is > >> consistent with every other subsystem that deals with multi-speed links. > > > > Can you point me to the logging in these other subsystems so I can > > learn more about how they deal with this? > > I don't have any in-depth articles about the logging in these systems, > but I can extract some logs from my machines. > > Ethernet: > > [Sun Apr 21 11:14:06 2019] e1000e: eno1 NIC Link is Down > [Sun Apr 21 11:14:17 2019] e1000e: eno1 NIC Link is Up 1000 Mbps Full > Duplex, Flow Control: Rx/Tx > [Sun Apr 21 11:14:23 2019] e1000e: eno1 NIC Link is Up 1000 Mbps Full > Duplex, Flow Control: Rx/Tx > [Sun Apr 21 23:33:31 2019] e1000e: eno1 NIC Link is Down > [Sun Apr 21 23:33:43 2019] e1000e: eno1 NIC Link is Up 1000 Mbps Full > Duplex, Flow Control: Rx/Tx > [Sun Apr 21 23:33:48 2019] e1000e: eno1 NIC Link is Up 1000 Mbps Full > Duplex, Flow Control: Rx/Tx > > I used to have one of these "green" ethernet switches that went down to > 100mbps automatically. You can imagine how "clogged" the logs were with > link up messages. Thank goodness that switch was killed in a thunderstorm. > > USB will log every device insertion and removal, very verbosely (see > appendix A). I have a hard time putting USB insertion and removal into the same class, the equivalent is PCI hotplug which is logged separately. Do we ever log beyond USB device discovery if a device is running at a lower speed than is possible? The most directly related is the green ethernet switch, which you admit was a nuisance due to exactly this sort of logging. It was probably confusing to see this logging, perhaps you wondered if the cable was bad or the switch was defective. > > I agree that emitting log messages for normal and expected events will > > lead to user confusion and we need to do something. > > > > e8303bb7a75c ("PCI/LINK: Report degraded links via link bandwidth > > notification") was merged in v5.1-rc1, so we still have (a little) > > time to figure this out before v5.1. > > I always viewed the system log as a system log, instead of a database of > system errors. I may have extremist views, but going back to Alex's > example, I prefer to see that the power saving mechanism is doing > something to save power on my laptop (I'll just ignore it on a desktop). There's a disconnect from above where similar behavior on ethernet behavior "clogged" the log files, but here we just want to ignore it. Excessive logging can also be considered a denial of service vector when the device generating that excessive logging is attached to a userspace driver. > If you think increasing code complexity because people don't want things > logged into the system log, then I'm certain we can work out some sane > solution. It's the same problem we see with GCC, where people want > warning messages here, but don't want the same messages there. v5.1 is approaching quickly, can we downgrade these to pci_dbg() while we work on maybe some sort of driver participation in this logging? Thanks, Alex