Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3040714ybd; Fri, 28 Jun 2019 01:44:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqxPtWfJB9c5/W6+tVI1VGzC6Tlt3qbfqDDqJNIuE6f02pQIy5kLxiOpJG2+8hh8PijXebTX X-Received: by 2002:a17:90a:8c92:: with SMTP id b18mr11444566pjo.97.1561711468723; Fri, 28 Jun 2019 01:44:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561711468; cv=none; d=google.com; s=arc-20160816; b=cRPySSpCbWTXmvHR4p5QjmNT9vycJCZWDkUe/GMJkKxHvBBRl/+0ekfMANZR+OIVxv kyNMRj4uD2gy6M3/kz/ptB9U0aWdmtKbL08S+Zh1FxPm1stp0Csu+i3iKByZjj8jScnq v7JmmAoQofeOrOOqp24+E93Mp0DSKK3XE8maQzSOKmXY/fopUgK2RvDGQlLveZ6ehylg JXvzd0k/ixNJwCMThut4u2jBTuG8rU7qettSTzhXq7nAFefVXYqR+oEPDag2ph48phYl PodQwMyXny7d0gtZ+/Ht5MyHNkqqNUeiiCzuT2ApJabHMves0LeV2z5GYoYjxAeGW4Co oaiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=SYhgHvoqCpd/TVpkOLx97HSXv32aictfmOC2lNeGtxI=; b=EviRmtO1sAsW/faiaQ9Y2GbG0jnBLKmOm+TBLR/c9PV4hDiowHHCTSZh1a5r+6tcSh N+jrVTQOLMard8CD7T02rZlMYwKuzhy+ZwgiSMkQb9zoJcQYAiWF/dn0zoP+lfW2A4nh uNHEEaWZJrrCNrJ2PYQVfLosG5Oey6HxxBDmxGDMl+Al1aEhLFqoqww827deaZcodeqg QM4DEnniJGlkqfAsCsxn9Uod/qyV8ic9mZrhyhe7m/gpqWqlESH4vkVUEIh1+QN1KUjA 7PW/JxdBJNaOzLLp2+9xJVnwx8PPhvVnNnEIbgR4y4MNeLhtZhaA8j/oivpW/SzirvX2 pD1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ykGpmU6s; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 5si1817980pfv.231.2019.06.28.01.44.11; Fri, 28 Jun 2019 01:44:28 -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=@kernel.org header.s=default header.b=ykGpmU6s; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726519AbfF1IoG (ORCPT + 99 others); Fri, 28 Jun 2019 04:44:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:41556 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726385AbfF1IoG (ORCPT ); Fri, 28 Jun 2019 04:44:06 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CFA8D2070D; Fri, 28 Jun 2019 08:44:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561711445; bh=o6V86oek2kjSAYllqdbRs9diWyYXGQbO50xPH7OpvSM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ykGpmU6sP2eEgs8/lrb6HffixI0ak35r4b72eAIqMwJZJOc2Batv1QLFrvWcFA20k vIn+SxScmErc5TuHgzKadINK17LTRa+KL8Z+sw4PElRPhx/L8I3R/YcOETnnWp3EyR AzDVn+te4PTN2POdKWghJYgV/+4uWiiGlME9CeSM= Date: Fri, 28 Jun 2019 10:44:02 +0200 From: Greg KH To: Rajat Jain Cc: Bjorn Helgaas , linux-pci , Linux Kernel Mailing List , Rajat Jain Subject: Re: PCI/AER sysfs files violate the rules of how sysfs works Message-ID: <20190628084402.GA28386@kroah.com> References: <20190621072911.GA21600@kroah.com> <20190621141550.GG82584@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 27, 2019 at 05:56:59PM -0700, Rajat Jain wrote: > 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. Sounds good to me. thanks, greg k-h