Subject: Re: systat(:swap) misbehaving
To: Jeremy Cooper <jeremy@broder.com>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-sparc
Date: 01/22/1997 16:50:37
On Wed, 22 Jan 1997 16:47:20 -0800 (PST) 
 Jeremy Cooper <jeremy@broder.com> wrote:

 > It may be time to realize that kvm_read() should be depricated.  Atomic
 > operations on kernel data is just the sort of thing that sysctl() was
 > invented for, and it would probably be a good idea to implement that in
 > this case. What does everyone else think?

There are a couple of problems with using sysctl for general purpose
stuff like this:

	(1) The current implementation could ... use some improvement.
	    What it lacks right now is scalability.  To grovel a random
	    piece of data, you add code to the kernel.  Ick.

	(2) sysctl only deals with the currently-running kernel.

IMO, (2) is a show-stopper for a number of things.  I've often
used systat on kernel crash dumps as part of analyzing what went
wrong.

Sysctl has its place... I think it's terrific for things that are
relatively constant, e.g. "maxpartitions", "rawpartition", and things
that are "configurable" dynamically, e.g. net.inet.tcp.rfc1323.

Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                               Home: 408.866.1912
NAS: M/S 258-6                                          Work: 415.604.0935
Moffett Field, CA 94035                                Pager: 415.428.6939