Subject: Re: But why?
To: Miguel de Icaza <>
From: Jason Thorpe <>
List: tech-kern
Date: 10/24/1996 02:29:18
On Wed, 23 Oct 1996 22:53:15 -0500 
 Miguel de Icaza <> wrote:

 > Besides, we do not measure getpid (), we measure read()ing 1 byte from
 > a null device. realistic.

Couple of obvious flaws:

	- When you take a measurement of this test on different
	  types of OSes, you're not necessarily measuring the
	  same thing.  Not only are you not measuring simple
	  system-call overhead (which is what this whole
	  thing is about anyhow, right?), but different systems
	  may have different layering techniques which produce
	  `poor' results.

	- Even if the results are `poor' (which, in this crowd,
	  is defined as `slower that Linux', I guess), your
	  measurement may not be an indication of deterimental
	  impact on the system overall.

	- Just who reads one $#^% byte, anyhow?  System calls like
	  that are typically `optimized' for larger transactions,
	  like MAXPHYS (64k under BSD).

So, you're not testing the more common case.  Now, if you were to
test the common case, using a `NULL device' (I'm assuming /dev/null)
isn't fair, because to implement it, all you have to do is set resid
to 0 and return.  Indeed, to actually measure read() you have to copy
something to the user's address space.

Jason R. Thorpe                             
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