Subject: Re: microtime(9) slow on i386?
To: Perry E. Metzger <perry@wasabisystems.com>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: port-i386
Date: 10/22/2001 16:15:42
On Mon, Oct 22, 2001 at 05:15:28PM -0400, Perry E. Metzger wrote:

 > Jaromir Dolecek <jdolecek@NetBSD.org> writes:
 > > Upon further investigation, it shows that microtime(9) on i386 uses
 > > port i/o, which is very slow on modern processors. Is there a way
 > > to improve this? This could help system overall, since microtime(9)
 > > is used quite often.
 > 
 > We can check the cycle timer, but the problem there is that we can
 > easily lose on a machine with a variable rate clock.

Actually, I see NO reason why we need to be using microtime() at all.
The file system code seems perfectly happy with simply accessing
time, thusly:

	TIMEVAL_TO_TIMESPEC(&time, &ts);
	ITIMES(ip, &ts, &ts, &ts);

I see no reason the pipe code couldn't do the same.  It's not like
it's absolutely critical that those timestamps be super-accurate.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>