[LWN Logo]

Date:   Fri, 7 Jan 2000 11:49:09 -0800 (PST)
From:   Linus Torvalds <torvalds@transmeta.com>
To:     "Theodore Y. Ts'o" <tytso@MIT.EDU>
Subject: Re: /proc guidelines and sysctl



On Fri, 7 Jan 2000, Theodore Y. Ts'o wrote:
> 
> I actually like the original sysctl() design --- including the use of
> reserved numbers.  After all, we have system calls, and we don't try to
> look up system calls when we executed them by name..... why is this OK
> for system calls, but not OK for sysctl()?

Because system calls are performance-sensitive.

And system calls are not clearly "hierarchical".

And system calls are supposed to be there regardless of what software and
hardware configuration we have there.

In contrast, sysctl isn't all that performance-sensitive, AND they are
extremely hierarchical, AND they depend on configuration and timing. 

In short, sysctl NEEDS:
 - "naming": you cannot name the sysctl space with a number: it is much
   too dynamic for that. How do you enumerate drivers? Give them random
   numbers?
 - "listing": showing which sysctl's are there, in a hierarchical manner.
   Again, a listing is useless with a number.
 - "hierarchy". You have different devices, but they have the same
   controls. Do they get the same name? Yes. But in different places in
   the hierarchy.

In short, you NEED a filesystem. You need to be able to "ls" the thing.
You need to be able to search the thing. You need to be doing all the
things you can do with a real filesystem.

And flattening it out and trying to number it does not work. Never has,
never will. It's not an enumerated space.

		Linus


-
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/