Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jun 1998 20:17:55 +0100
From:      njs3@doc.ic.ac.uk (Niall Smart)
To:        Nate Williams <nate@mt.sri.com>, dyson@FreeBSD.ORG
Cc:        mike@smith.net.au (Mike Smith), hackers@FreeBSD.ORG
Subject:   Re: kernfs/procfs questions...
Message-ID:  <E0yhfWN-0000kp-00@oak66.doc.ic.ac.uk>
In-Reply-To: Nate Williams <nate@mt.sri.com> "Re: kernfs/procfs questions..." (Jun  4, 10:50am)

next in thread | previous in thread | raw e-mail | index | archive | help
On Jun 4, 10:50am, Nate Williams wrote:
} Subject: Re: kernfs/procfs questions...
> 
> > sysctl has a usable command interface.  It is very easy to use
> > the sysctl system calls and/or library routines.  Who cares if you
> > can't mmap it?  That wouldn't make much sense anyway.  For byte-counters,
> > there is alot more good that you can do with the wasted vnodes that
> > would be utilized by such a filesystem :-).
> 
> Byte counters shouldn't be in sysctl.  'sysctl' == System Control, not
> system monitoring.  This isn't (and shouldn't be) an SNMP system, which
> if you've ever had to use is a nightmare to work with w/out a huge
> document explaining all of your MIB's, which vary from vendor to vendor.

I think it is precisely small pieces of information like this that
belong in sysctl.  "sysctl kern.iface.ed0.ierrs" seems a better and
more natural interface than "cat /kern/iface/ed0/ierrs" for example.
If sysctl doesn't support this kind of dynamic registering/deregistering
of attributes I think spending time fixing that would be more useful
than working on kernfs.

> Sysctl is exactly that but worse, since there is *NO* set of MIB (nodes)
> that are standard, so every FreeBSD user has to become a sysctl expert
> and memorize the hierarchy in order to fully utilize it.
> 
> In other words, *MORE* esoteric stuff to remember, making FreeBSD/unix
> that much harder to administer.

What makes you think that kernfs is any easier to use that sysctl without
documentation?  sysctl -a can hardly be more/less descriptive than find
/kern.  If you think documentation is the problem then documentation is
the solution, not kernfs.

> Do I have a better solution Jordan asks?  The FS interface is *harder*
> for the kernel developer, but easier for the administrator.

I don't think its appreciably harder for the administrator to use sysctl
vs kernfs, granted there is some difference, but it's not significant.
The complexity difference in programming for kernfs vs sysctl is likely
to be much greater though.

> Nate's #1 rule of programming complexity:
> "You can't reduce complexity of a problem below a certain point.  You
> can move it around, but at some point it has to be somewhere."

Agreed, but my interpretation of this rule is that sysctl has more or
less reached the minimum complexity level of a kernel <-> userland
configuration and communication interface, further work would not
reduce this complexity level significantly but would be a lot of imho
wasted work.

[snip]
> This means that *someone* is going to have to deal with it, and the fact
> of the matter is that if we want unix to have more users then it should
> be the developers who have to work a bit harder to do it.

To be honest, I think the average newbie or person evaluating FreeBSD
would appreciate a GUI administration interface orders of magnitude more
than a kernfs :)

> (BTW, I have a corollary to the above rule that states "Just because a
> problem is complex doesn't mean it can't be simplified, or that all of
> the complexity is necessary." ;)

Rule 2:  Simple things aren't always as complex as they look.  (UNIX)

Corollary 2:  Complex things aren't always as simple as they look.  (NT)


Niall

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E0yhfWN-0000kp-00>