From: Dave Peterson <dsp@llnl.gov>
To: Arjan van de Ven <arjan@infradead.org>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>,
linux-kernel@vger.kernel.org, torvalds@osdl.org, alan@redhat.com,
gregkh@kroah.com, Doug Thompson <dthompson@lnxi.com>,
bluesmoke-devel@lists.sourceforge.net
Subject: Re: [PATCH] EDAC: core EDAC support code
Date: Thu, 9 Mar 2006 15:51:25 -0800 [thread overview]
Message-ID: <200603091551.25097.dsp@llnl.gov> (raw)
In-Reply-To: <1141758219.3048.10.camel@laptopd505.fenrus.org>
On Tuesday 07 March 2006 11:03, Arjan van de Ven wrote:
> afaics it is a list of pci devices. these should just be symlinks to the
> sysfs resource of these pci devices instead, not a flat table file.
Ok, I'm looking at the EDAC sysfs interface. I see the following
issues concerning the "one value per file" rule:
1. /sys/devices/system/edac/mc/mc0/module_name contains two
values, a module name and a version:
# cat /sys/devices/system/edac/mc/mc0/module_name
k8_edac Ver: 2.0.1.devel Mar 8 2006
#
2. /sys/devices/system/edac/mc/mc0/supported_mem_type contains
the following on the machine I am looking at:
# cat /sys/devices/system/edac/mc/mc0/supported_mem_type
Unbuffered-DDR Registered-DDR
#
Here we have a whitespace-delimited list of values. Likewise,
the following files contain whitespace-delimited lists:
/sys/devices/system/edac/mc/mc0/edac_capability
/sys/devices/system/edac/mc/mc0/edac_current_capability
3. The following files contain comma-delimited lists of
(vendor ID, device ID) tuples:
/sys/devices/system/edac/pci/pci_parity_blacklist
/sys/devices/system/edac/pci/pci_parity_whitelist
I assume this is what Arjan is referring to.
Documentation/drivers/edac/edac.txt gives the following
description of how the whitelist functions:
This control file allows for an explicit list of PCI
devices to be scanned for parity errors. Only devices
found on this list will be examined. The list is a line
of hexadecimel VENDOR and DEVICE ID tuples:
1022:7450,1434:16a6
One or more can be inserted, seperated by a comma.
To write the above list doing the following as one
command line:
echo "1022:7450,1434:16a6"
> /sys/devices/system/edac/pci/pci_parity_whitelist
To display what the whitelist is, simply 'cat' the same
file.
Looking at the current EDAC implementation, these are all of the
"one value per file" issues I see. If anyone sees any others I
missed, please let me know. Here are my thoughts on each:
Issue #1
--------
Fixing this is easy. /sys/devices/system/edac/mc/mc0/module_name
can be replaced by two separate files, one providing the name and
the other providing the version:
/sys/devices/system/edac/mc/mc0/module_name
/sys/devices/system/edac/mc/mc0/module_version
Issue #2
--------
To fix this, /sys/devices/system/edac/mc/mc0/supported_mem_type
can be made into a directory containing a file representing each
supported memory type. Thus we might have the following:
/sys/devices/system/edac/mc/mc0/supported_mem_type
/sys/devices/system/edac/mc/mc0/supported_mem_type/Unbuffered-DDR
/sys/devices/system/edac/mc/mc0/supported_mem_type/Registered-DDR
In the above example, the files Unbuffered-DDR and Registered-DDR
would each be empty in content. The presence of each file would
indicate that the memory type it represents is supported.
Issue #3
--------
I am unclear about what to do here. If the list contents were
read-only, it would be relatively easy to make
/sys/devices/system/edac/pci/pci_parity_whitelist into a directory
containing symlinks, one for each device. However, the user is
supposed to be able to modify the list contents. This would imply
that the user creates and destroys symlinks. Does sysfs currently
support this sort of behavior? If not, what is the preferred
means for implementing a user-modifiable set of values?
next prev parent reply other threads:[~2006-03-09 23:51 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200601190414.k0J4EZCV021775@hera.kernel.org>
2006-03-05 10:18 ` Arjan van de Ven
2006-03-05 10:30 ` Arjan van de Ven
2006-03-06 18:14 ` Dave Peterson
2006-03-06 18:22 ` Randy.Dunlap
2006-03-07 17:03 ` Dave Peterson
2006-03-07 17:20 ` Greg KH
2006-03-08 0:29 ` Dave Peterson
2006-03-07 19:03 ` Arjan van de Ven
2006-03-07 19:05 ` Greg KH
2006-03-09 23:51 ` Dave Peterson [this message]
2006-03-10 0:02 ` Greg KH
2006-03-10 1:46 ` Dave Peterson
2006-03-10 7:36 ` Arjan van de Ven
2006-03-10 11:06 ` Tim Small
2006-03-10 11:40 ` Arjan van de Ven
2006-03-10 17:46 ` Dave Peterson
2006-03-10 17:58 ` Arjan van de Ven
2006-03-10 19:07 ` Dave Peterson
2006-03-10 19:33 ` Arjan van de Ven
2006-03-10 21:13 ` Dave Peterson
2006-03-10 21:23 ` Arjan van de Ven
2006-03-11 1:57 ` Dave Peterson
2006-03-11 7:18 ` Arjan van de Ven
2006-03-13 19:31 ` Dave Peterson
2006-03-06 19:52 ` Greg KH
2006-03-05 15:55 ` Greg KH
2006-03-05 16:24 ` Arjan van de Ven
2006-03-06 18:52 ` Dave Peterson
2006-03-06 19:53 ` Greg KH
2006-03-06 21:01 ` Dave Peterson
2006-03-06 21:07 ` Arjan van de Ven
2006-03-09 3:19 ` Dave Peterson
2006-03-09 3:44 ` Al Viro
2006-03-09 5:51 ` Greg KH
2006-03-06 21:32 ` Al Viro
2006-03-06 21:53 ` Greg KH
2006-03-06 22:24 ` Al Viro
2006-03-06 22:55 ` Greg KH
2006-03-07 10:41 ` Andrew Morton
2006-03-07 11:08 ` Al Viro
2006-03-08 2:46 ` Rusty Russell
2006-03-07 1:45 ` Dmitry Torokhov
2006-03-07 1:57 ` Greg KH
2006-03-07 2:10 ` Dmitry Torokhov
2006-03-07 16:47 ` Dave Peterson
2006-03-07 17:04 ` Greg KH
2006-03-07 17:06 ` Dave Peterson
2006-03-08 1:03 ` Dmitry Torokhov
2006-03-08 1:33 ` Greg KH
2006-03-10 0:44 Doug Thompson
2006-03-10 16:56 Doug Thompson
2006-03-10 17:11 ` Arjan van de Ven
2006-03-10 17:28 Doug Thompson
2006-03-10 20:37 Doug Thompson
2006-03-11 17:04 Doug Thompson
2006-03-13 19:35 ` Dave Peterson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200603091551.25097.dsp@llnl.gov \
--to=dsp@llnl.gov \
--cc=alan@redhat.com \
--cc=arjan@infradead.org \
--cc=bluesmoke-devel@lists.sourceforge.net \
--cc=dthompson@lnxi.com \
--cc=gregkh@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@xenotime.net \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®