Re: LSB1.1: /proc/cpuinfo
On Thu, 3 Jan 2002 19:56:51 -0500 (EST)
Alexander Viro <email@example.com> wrote:
> It's more than just a name.
> a) granularity. Current "all or nothing" policy in procfs has
> a lot of obvious problems.
> b) tree layout policy (lack thereof, to be precise).
> c) horribly bad layout of many, many files. Any file exported by
As usual, Al has hit the highpoints (five lines vs. >> 1000 msgs of proc
flamewars over time). At risk of boring regular readers, I shall expand:
There is /proc, and /proc/sys. /proc is a pain to use in the kernel (seq_*
made this better recently, but far from perfect), but is flexible.
/proc/sys (aka sysctl) is easier to use, but a PITA for dynamic entries.
The "manual formatting" nature of /proc entries has lead to (c) mentioned by
Al. This can be alleviated by making the simplest method of exporting data
the correct one (ie. more like /proc/sys).
The tree layout issues are more complicated. In particular, the following
namespaces should be equivalent:
Boot command line: 3c509.debug=1
Module parameter: insmod 3c509 debug=1
proc entry: echo 1 > .../3c509/debug
Finally, I consider the granularity issue a red-herring: if it's in the
kernel, it should be in a logical location.
Now, I have a sample patch for a simple "/proc/sys" replacement which follows
the "one value per file" (similar to the current proc/sys) and
"dynamic is easy" principle (required for widespread use). I also have
module loader rewrite and boot param unification patches.
Important to realize that we will be stuck with the current interfaces for
another stable kernel version (backwards compatibility is a WIP).
Once Linus accepts general patches again I shall start pushing things to
Hope that helps,
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.