cvs commit: src/sys/amd64/include atomic.h src/sys/i386/include
atomic.h
John Baldwin
jhb at freebsd.org
Wed Dec 27 14:52:16 PST 2006
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
More information about the cvs-src
mailing list