Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Jun 2016 20:43:46 +0200
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: [PATCH] microoptimize locking primitives by avoiding unnecessary atomic ops
Message-ID:  <20160601184346.GA14712@dft-labs.eu>
In-Reply-To: <1588845.bSUmdZtqRF@ralph.baldwin.cx>
References:  <20160527191700.GA23039@dft-labs.eu> <1588845.bSUmdZtqRF@ralph.baldwin.cx>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 27, 2016 at 04:21:11PM -0700, John Baldwin wrote:
> On Friday, May 27, 2016 09:17:01 PM Mateusz Guzik wrote:
> > Hello there,
> > 
> > quite some time ago I posted a trivial patch to locking primitives. What
> > they do is the inline part tries an atomic op and if that fails the
> > actual function is called, which immediately tries the same op.
> > 
> > The obvious optimisation checks for the availability of the lock first.
> > 
> > There concerns about the way it was done previously by relying on
> > volatile behaving in a specific way.
> > 
> > Later a simplified version was posted which should not have the concern,
> > but the thread died.
> > 
> > I refer you to https://lists.freebsd.org/pipermail/freebsd-current/2015-November/058100.html
> > for simple benchmark results.
> > 
> > I would like to get the patch in before 11 freeze.
> 
> I think this looks fine.  Thanks for expanding the previous patch to cover
> more primitives.
> 

Thanks, committed in https://svnweb.freebsd.org/changeset/base/301157

-- 
Mateusz Guzik <mjguzik gmail.com>



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