Subject: Re: Improving the Unix API
To: Doug Rabson <>
From: Alexander Viro <>
List: tech-kern
Date: 06/28/1999 06:12:44
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

> 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