Subject: Re: bzero
To: None <email@example.com>
From: Simon Burge <firstname.lastname@example.org>
Date: 11/14/2001 10:34:35
Jason R Thorpe wrote:
> 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.
"Read the code" :-)
The cacheline size is cached, and there's both memset() and bzero()
Simon Burge <email@example.com>
NetBSD CDs, Support and Service: http://www.wasabisystems.com/