Subject: Re: CVS commit: src/sys/kern
To: Matthew Orgass <darkstar@city-net.com>
From: Andrew Brown <atatat@atatdot.net>
List: tech-kern
Date: 04/10/2004 01:33:46
On Fri, Apr 09, 2004 at 10:45:42PM -0400, Matthew Orgass wrote:
>On 2004-04-09 darkstar@city-net.com wrote:
>
>>   How about this one: maxbigpipes: Maximum number of "Big" pipes.  I do
>> have a question about that one, but the description doesn't help (although
>> I admit it could without being much longer).
>
>  Actually, there are a number of potential questions about that one that
>are more complex, such as what happens when you run out of "big" pipes.

dunno.  fwiw, the descriptions of the pipe nodes are taken sys_pipe.c.
i didn't find anything else easily.  otoh, now that it's easier to put
a note with something when you make a new node, perhaps things won't
be so confusing from now on.  ;-)

>This might benefit from a long description, but it may also be that some
>long descriptions are too complex to easily be put in a paragraph or would
>need to be duplicated several times in slightly different ways or relate
>different values.  One potential solution would be to require a
>description of exactly one word, that being the name of the man page that
>describes this value.  This could be done in the kernel with less memory
>use and fewer consequences for not including it, although I still tend to
>think it would be better to do in userland as I suggested (and would avoid
>the issues of needing aliases).  You could have "sysctl man foo.whatever"
>or such bring up the man page that describes foo.whatever.  Once you know
>what it means, I think the name of the node is as likely to prompt you to
>remember as a short description, and this would remind those adding a
>sysctl to document it in a man page.

the man page thing (the reference, that is) is a fine idea.  i
considered it myself.  i also thought it might be nice if the
description that the kernel has was simply a "default 7-bit ascii
american english" description, but that the description data that the
kernel handed out also contained a reference to a message catalog of
some sort.  that way you could have longer or multi-lingual
descriptions in userland, but still let the kernel do what it must.
as for actually making it work like that, i decided not to handle just
yet.

making all this work is simply an encoding problem -- afaict, the
existing infrastructure can already support all of this.  since (in my
mind) all that would be required would be a change to the strings
themselves and then a change to the userland interpretation of those
strings (with no ill effects on those that missed the memo), it
wouldn't be too hard to revisit that at a later point.

as for the name of the node being descriptive enough, here are some
counterexamples (and i'll restrict myself to leaves):

	stats
	tabstops
	conf
	drops
	lines
	debug
	len
	pin14
	timex
	version

by themselves, they don't tell you much.  it's only in the context of
the entire path that you can *maybe* guess what they are or do.  and
for some of them, not even then.

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
werdna@squooshy.com       * "information is power -- share the wealth."