Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2703126ybd; Thu, 27 Jun 2019 17:58:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqz2r2fxEyiVLRH6u0Q0kuJH1Uj2iB6JN9kLqqRlfjPXgKGGuCAg1WNt/GPMwWemIaM56CNZ X-Received: by 2002:a63:3042:: with SMTP id w63mr6594672pgw.21.1561683493332; Thu, 27 Jun 2019 17:58:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561683493; cv=none; d=google.com; s=arc-20160816; b=M823DNpVh/csXsfuSC5x0dLI/w9fovUBrtJOjmUcfYE4aaoZxhS4pYmZGpwWqlwJz8 25MHgR8XbkfsSdtokvejj8Bj97o5rhpjq0VgOSTWnhNNF1/qcPoaLeV4NmMP331krhFR pEF9FzzkJNMjCol6ZQyc9qOzhSXISAN/XhLER5ZbBzAKPduxnSs92lLxi3k4PabJb9+W vtB3ZzMEAAQ6zinYJqQwhSYJsQw5RmWlNfzKtLbJ2Mikp/iJAVcOrBX9QUV35IAs4Mre YQuH4wx4i16FRGQzSwwOKIzA1CvVhapVgGkCFA091AaCpOz5JbCjUovUQ2yGtdrUH86a Ic9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=+ColG6tAMdXMX0sMcY5uS4eoT6aSf9bBNC0BhjT/Dps=; b=PUROOuzI2Z7qHAomqb1hnaZBUy92qig27R89t6TNuAlwEa6wwRBDa1o63gvZnhdKDH ew4X9XG+UyjCLUviTknFVosuyT1yiINReJ0b3H6EsDEe+MK2ACLLNeTaLBJMvVlAY0r9 KnSNo69eRI2zXDxz7GL22fj7vK4/mb8a9/AOFsC4/EH1YDT1SxT2NHZPovETpxCOQ7NQ 287guJr2x5peGj21LK3AXFUtLMZKWtwdu+XnJ/uyLHC4UDYNO9hTwWwOVz9i6eIUveoi H5KZXYP4ChXU+4JvKFR//8/nZ4zOmtcOA5Q9ip9M9jr/ORJadH5yEHqcL3y1ACHLbSB+ XS8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=FkqymYqS; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a2si669505pgb.166.2019.06.27.17.57.57; Thu, 27 Jun 2019 17:58:13 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=FkqymYqS; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726694AbfF1A5i (ORCPT + 99 others); Thu, 27 Jun 2019 20:57:38 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:42584 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726595AbfF1A5i (ORCPT ); Thu, 27 Jun 2019 20:57:38 -0400 Received: by mail-lj1-f196.google.com with SMTP id t28so4195148lje.9 for ; Thu, 27 Jun 2019 17:57:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+ColG6tAMdXMX0sMcY5uS4eoT6aSf9bBNC0BhjT/Dps=; b=FkqymYqSYyzMnl6BeJ+0JA3KpJHYhMUGxyg0//P/F1xTjwGV+Hc9nP0j5AsWIVw5TS 2hn64vii2DskH08AM9sDw3qiDUv/WCWoxusc5AeMIj95ts7Vv60TMDrhCj/SQjBZtfr+ p0IShO+mgPJZbNVIMebQ1ETCdkb8Kyosa6OFKhjis+06cUKGrTDtYvoqzQe+hjLHV1W9 jSa3kCvJq0/ejTtP3/F9KrzdmtDtN3g9dan53g7+QxeK01SpIUQze4Aq5c20BRE7jJlF c2L5g9neQT9bl0JIoRrsWpH5jBJ8rXGU6gMlShDZWdhPxmfjynrl7l4nY+37ZO+ZRfVd pbqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+ColG6tAMdXMX0sMcY5uS4eoT6aSf9bBNC0BhjT/Dps=; b=FNv3Riywhf40WaxG1byAXMJVPo5qfaHgUaWTKzyTX2nGhFWr8vs0w7npUTAFEX8u8Z XvVIn+EXrnHQIgNnzsV8tRPMhjupDIlH94PAK1E8drbkfN1Xt0bC0Q1S1XATOsTffre3 F7j6HXDSSrYeCxF80Y0hohEUZwNoHxTuioSMQqDcKdzAuncS27FND0sdUgl/zb7yZtlL V+FDa+FLPVX19awRjGNaeqeSjSmrv2O06o/nXBh+Y4IZCFUyE135Gy3EOZKjpX78iURw ZsvV3B2C5NOdfAGMS49xzDlPDN+EiCW/D/UNYPapZu0v/rsTLC8uWB6+iFwm+Wwx+hHY K09A== X-Gm-Message-State: APjAAAXTMsJMr5P8LF2VWoF5dfMruppsdqkiYcKl7qc7OEKD95x24IKM cBN3Gqn7xtFw8CawX6PiduR3L8ve7u4YieJjXC471g== X-Received: by 2002:a2e:a311:: with SMTP id l17mr4294915lje.214.1561683455952; Thu, 27 Jun 2019 17:57:35 -0700 (PDT) MIME-Version: 1.0 References: <20190621072911.GA21600@kroah.com> <20190621141550.GG82584@google.com> In-Reply-To: <20190621141550.GG82584@google.com> From: Rajat Jain Date: Thu, 27 Jun 2019 17:56:59 -0700 Message-ID: Subject: Re: PCI/AER sysfs files violate the rules of how sysfs works To: Bjorn Helgaas Cc: Greg KH , linux-pci , Linux Kernel Mailing List , Rajat Jain Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 21, 2019 at 7:15 AM Bjorn Helgaas wrote: > > On Fri, Jun 21, 2019 at 09:29:11AM +0200, Greg KH wrote: > > Hi, > > > > When working on some documentation scripts to show the > > Documentation/ABI/ files in an automated way, I ran across this "gem" of > > a sysfs file: Documentation/ABI/testing/sysfs-bus-pci-devices-aer_stats > > > > In it you describe how the files > > /sys/bus/pci/devices//aer_dev_correctable and > > /sys/bus/pci/devices//aer_dev_fatal and > > /sys/bus/pci/devices//aer_dev_nonfatal > > all display a bunch of text on multiple lines. > > > > This violates the "one value per sysfs file" rule, and should never have > > been merged as-is :( > > > > Please fix it up to be a lot of individual files if your really need all > > of those different values. > > Sorry about that. Do you think we're safe in changing the sysfs ABI > by removing the original files and replacing them with new, better > ones? This is pretty new and hopefully not widely used yet. Hi Bjorn / Greg, I'm thinking of having a named group for AER stats so that all the individual counter attributes are put under a subdirectory (called "aer_stats") in the sysfs, instead of cluttering the PCI device directory. I expect to have the following counters in there: dev_err_corr_ (Total 8 such files) dev_err_fatal_ (Total 17 Such files) dev_err_nonfatal_ (Total 17 Such files) dev_total_err_corr (1file) dev_total_err_fatal (1file) dev_total_err_nonfatal (1file) rootport_total_err_corr (1file - only for rootports) rootport_total_err_fatal (1file - only for rootports) rootport_total_err_nonfatal (1file - only for rootports) Please let me know if this sounds ok. Thanks & Best Regards, Rajat > > Bjorn