Re: Improving the Unix API

Alexander Viro (viro@math.psu.edu)
Mon, 28 Jun 1999 06:12:44 -0400 (EDT)


On Mon, 28 Jun 1999, Doug Rabson wrote:

> As far as I know, only FreeBSD has a string-based sysctl implementation.
> Something which always confused me about Linux' procfs - what have all
> these kernel variables got to do with process state? We used to have a

Nothing. procfs is a union of 4 filesystems. Historical reasons ;-/
There are:
1) <pid>/* - per-process stuff. Procfs proper.
2) sys/ - what kernfs should be. I.e. fs interface for sysctl tree.
3) openpromfs - sparc only (?), AFAICS not actively maintained.
4) the rest - mostly information advertised by drivers + kcore + kmsg,
etc. Stuff that is not covered by sysctls (/dev/core is a symlink to
/proc/kcore. 'nuff said.)

They are different code-wise and ought to be separated. As soon as we'll
have working unionfs (or at least non-opaque mount) they *will* be
separated.

> kernfs which was intended for this kind of thing but it rotted after
> people started extending sysctl for the purpose.

/proc/sys on Linux. It was stuffed into procfs because at that moment
procfs was the only virtual filesystem (and because they shared some
code).

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/