Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Dec 2005 23:31:34 +0100
From:      Andre Oppermann <andre@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/sys/kern subr_witness.c src/sys/sys _lock.h lock.h
Message-ID:  <4394BFC6.E66F23A1@freebsd.org>
References:  <200512052045.jB5KjOQv050836@repoman.freebsd.org> <200512051552.47724.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
John Baldwin wrote:
> 
> On Monday 05 December 2005 03:45 pm, John Baldwin wrote:
> > jhb         2005-12-05 20:45:24 UTC
> >
> >   FreeBSD src repository
> >
> >   Modified files:
> >     sys/kern             subr_witness.c
> >     sys/sys              _lock.h lock.h
> >   Log:
> >   Tweak witness handling of lock object to shave 2 pointers off of each
> >   lock object (and thus off of each mutex and sx lock):
> >
> >   ...
> >
> >   With these changes, struct mtx shrinks from 36 to 28 bytes on 32-bit
> >   platforms and from 72 to 56 bytes on 64-bit platforms.  Note that this
> >   commit will completely and utterly destroy the kernel ABI, so no MFC.
> >
> >   Tested on:      alpha, amd64, i386, sparc64
> 
> andre@ reported a 5% perf increase from this change on at least one network
> benchmark.

I tested only with WITNESS enabled and there it did in fact make a 5%
difference on a HTTP connection performance test over the loopback
interface.  It is mostly limited by lock performance and I was measuring
only 33 instructions on average between two lock operations (lock or
unlock).

-- 
Andre



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