Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Nov 2004 13:52:50 -0500
From:      Stephan Uphoff <ups@tree.com>
To:        Phil Brennan <phil.brennan@gmail.com>
Cc:        "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>
Subject:   Re: macro benchmark for mutex locks needed.
Message-ID:  <1101235970.26313.9901.camel@palm.tree.com>
In-Reply-To: <ff0f76e0041123083294a4094@mail.gmail.com>
References:  <1101227104.26313.9422.camel@palm.tree.com> <ff0f76e0041123083294a4094@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2004-11-23 at 11:32, Phil Brennan wrote:
> Could you post up some of your ideas to achieve these speedups? I'm
> fascinated by this area, because it is such a crucial one if freebsd
> is to perform well after all the work in unwinding giant.

Mostly boring stuff like making sure that important mutexes live in
their own cache line to avoid false sharing and tweaking some code to
avoid unnecessary invalidation of cache lines.
There are also some architecture specific assembly tweaks that I like to
try. Maybe a few hacks for dynamic run time patching to allow processor
specific and SMP/UP optimizations on a GENERIC kernel.
Replacing cli/sti with a spl() style interrupt enabler/disabler for i386
is also something I would like to test to speed up spin locks.
Restoring single thread wakeup for sleep mutexes is also on the list. 
Once I start digging I will probably find more things to try.

> 
> On Tue, 23 Nov 2004 11:25:04 -0500, Stephan Uphoff <ups@tree.com> wrote:
> > I have a bunch of ideas to speed up spin and mutex locks somewhat.
> > For this I need benchmarks to test different modifications.
> > 
> > While the micro-benchmark from rwatson@ is a good way to quickly test
> > modifications to weed out unlikely candidates - jhb@ tests have shown
> > that micro and macro-benchmarks do not always show the same result.
> > 
> > Running benchmarks and booting takes a lot of time.
> > Since this is NOT one my favorite tasks I want to run generally accepted
> > benchmarks so I can test (boot) each modification exactly once for each
> > test machine.
> > 
> > If you think I should run certain benchmarks with certain parameters
> > please tell me BEFORE I start testing!
> > 
> > Thanks




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