Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Dec 2006 16:50:05 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        Bruce Evans <bde@freebsd.org>
Cc:        cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/sys/amd64/include atomic.h src/sys/i386/include atomic.h
Message-ID:  <200612271650.06432.jhb@freebsd.org>
In-Reply-To: <200612272026.kBRKQ1gP000873@repoman.freebsd.org>
References:  <200612272026.kBRKQ1gP000873@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 27 December 2006 15:26, Bruce Evans wrote:
> bde         2006-12-27 20:26:00 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/amd64/include    atomic.h 
>     sys/i386/include     atomic.h 
>   Log:
>   Avoid an instruction in atomic_cmpset_{int_long)() in most cases.
>   These functions are used a lot for mutexes, so this reduces the text
>   size of an average kernel by about 0.75%.  This wasn't intended to
>   be a significant optimization, but it somehow increased the maximum
>   number of packets per second that can be transmitted by my bge hardware
>   from 320000 to 460000 (this benchmark is CPU-bound and remarkably
>   sensitive to changes in the text section).

Very cool, thanks!  It'd be nice to get rid of the 'sete' as well (if there
were someway to let gcc know that a bool return value was mapped to a flag
in %eflags), but this fix alone is most welcome.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612271650.06432.jhb>