Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jun 2003 11:13:37 +0000
From:      Bosko Milekic <bmilekic@technokratis.com>
To:        Bruce M Simpson <bms@spc.org>, freebsd-hackers@freebsd.org, alc@freebsd.org, jmallett@freebsd.org
Subject:   Re: Optimizing mutex alignment viz cache line access
Message-ID:  <20030625111337.GA4383@technokratis.com>
In-Reply-To: <20030624193431.GW9463@spc.org>
References:  <20030624193431.GW9463@spc.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jun 24, 2003 at 08:34:31PM +0100, Bruce M Simpson wrote:
[...]
> Would the workaround, then, not be to modify the mtx_*() set of functions
> to use a zone allocator, whose allocation function could then be tuned to
> allocate the lock structure which is frobbed by the atomic_*() functions
> on separate cache lines?
> 
> BMS

  Not all mutexes are dynamically allocated.

  Also, you have to really be careful here.  There may not be much of a
  point in spending all this time re-aligning the actual lock knob in
  the structure, which is accessed atomically with the bus locked all
  the time.

  There are a lot of structures which could probably be re-organized for
  cache gain purposes but at this point we have so many structures
  changing so quickly that this sort of change becomes difficult to do
  properly.

-- 
Bosko Milekic  *  bmilekic@technokratis.com  *  bmilekic@FreeBSD.org
TECHNOkRATIS Consulting Services  *  http://www.technokratis.com/



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