Date: Wed, 17 Nov 2004 14:40:17 -0500 (EST) From: Daniel Eischen <deischen@freebsd.org> To: Petri Helenius <pete@he.iki.fi> Cc: freebsd-threads@freebsd.org Subject: Re: mutex performance Message-ID: <Pine.GSO.4.43.0411171435040.3952-100000@sea.ntplx.net> In-Reply-To: <419BA6BA.4060304@he.iki.fi>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 17 Nov 2004, Petri Helenius wrote: > Daniel Eischen wrote: > > >On Wed, 17 Nov 2004, Petri Helenius wrote: > > > >>Do you feel that mutex performance could be improved from the current > >>2-3 million lock/unlock operations per second on uncontested mutexes on > >>~2.4Ghz prescott? Which seems to be about 1000 cycles per lock/unlock. [ ... ] > And I'm wondering how much I need to engineer around mutexes or holding > them for longer and releasing just before yielding. I'm not saying it > should/must be better, just trying to ask for the feel where to go. It should get better, so... > >I want to change libpthread locks to drop the 80386 support > >and just use the atomic primitives for default mutex types. > >In 6.0, we'll also change all the mutexes, CVs, and semaphores > >so they aren't pointers -- that will save an indirection and > >also allow them to be process shared. > > > Do you have patches or is this on planning stage? Just planning. The change from pointer type to structure is a big change; it breaks the ABI and affects libc, libthr, libpthread, libc_r (if we keep it around in 6.0). Changing our current low-level locks to use the atomic functions is less intrusive and will be done first. -- DE
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.43.0411171435040.3952-100000>