Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bzero



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()
entry points.

Simon.
--
Simon Burge                            <simonb%wasabisystems.com@localhost>
NetBSD CDs, Support and Service:    http://www.wasabisystems.com/



Home | Main Index | Thread Index | Old Index