Subject: Re: bzero
To: Simon Burge <>
From: Jason R Thorpe <>
List: port-powerpc
Date: 11/13/2001 15:16:19
On Wed, Nov 14, 2001 at 10:06:36AM +1100, Simon Burge wrote:

 > The latest code drop from Martin includes fetching the cache line size
 > with the machdep.cachelinesize sysctl.

While I haven't looked at the code yet (at all :-), I have some
comments that may or may not be useful:

	(1) The cacheline size should be cached.  I.e. check it, if
	    zero, then do the sysctl to fetch it, otherwise just
	    use the cached value.

	(2) An optimized bzero() is cool, but the standard API is
	    memset().  I suppose you want to check to see if the
	    value argument to memset() is 0 (which should be an
	    extremely common case) and branch to the optimized
	    zero loop if so.

        -- Jason R. Thorpe <>