Subject: Re: problems with ahc vs. format command
To: Manuel Bouyer <>
From: Todd Vierling <>
List: tech-kern
Date: 06/12/2001 12:45:02
On Tue, 12 Jun 2001, Manuel Bouyer wrote:

: > 	callout_reset(&scb->xs->xs_callout,
: > 	    (newtimeout > 3*1000*1000 ?
: > 		((newtimeout / 1000 + 1) * hz) : (newtimeout * hz) / 1000),
: > 	    ahc_timeout, scb);

: The question is whenever the test is really less expansive than the
: 64bit computation. I think on some platforms it may be more expensive.

Only on LP64 platforms, really (sparc64, alpha) -- and those could be
conditionally compiled to use solely 64-bit arithmetic.

The flip side is that a 64-bit "/ 1000" is a *lot* slower than its 32-bit
equivalent on ILP32 platforms, particularly those for which even integer
divide is a library function (sparc v7).

We need to take a harder look at the places where we're gratuitously
increasing integer op overhead in critical paths.  Given that disk activity
is a common occurrence, I can see the advantage of using 32-bit arithmetic
where possible.

-- Todd Vierling <>  *  Wasabi NetBSD:  Run with it.
-- NetBSD 1.5 now available on CD-ROM  --