Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Dec 2015 13:18:14 -0500 (EST)
From:      Daniel Eischen <deischen@freebsd.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        John Baldwin <jhb@freebsd.org>, freebsd-arch@freebsd.org, freebsd-threads@freebsd.org
Subject:   Re: libthr shared locks
Message-ID:  <Pine.GSO.4.64.1512251310090.14902@sea.ntplx.net>
In-Reply-To: <20151224191408.GA3625@kib.kiev.ua>
References:  <20151223172528.GT3625@kib.kiev.ua> <4199356.DlQeWDh27F@ralph.baldwin.cx> <Pine.GSO.4.64.1512240836460.9582@sea.ntplx.net> <5496837.TbTQtANDNj@ralph.baldwin.cx> <Pine.GSO.4.64.1512241338340.10649@sea.ntplx.net> <20151224191408.GA3625@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 24 Dec 2015, Konstantin Belousov wrote:

> On Thu, Dec 24, 2015 at 01:46:25PM -0500, Daniel Eischen wrote:
>> Can we still implement things like robust and priority mutexes in a
>> pshared mutex with Konstantin's implementation?  The rest of the world
>> (Linux, Solaris anyway) use structs and get by just fine ABI-wise.
> 
> Yes, we do. I intend to do this as the next stage, planned the
> implementation and did some preparations for it in the current patch.
> This raises the question, why do you suppose that my approach with
> the off-page would not allow it ? I am asking not to argument, but to
> understand a possible shortcoming in the approach, which I missed.

No, I was merely inquiring, if this is on your agenda, that's
good.

> From the implementation PoV, off-page is completely equivalent to the
> in-line structs approach, and the difference is only in the initial
> translation of say pthread_mutex_t to the structure (off-page lookup vs.
> identity). The issues with maintaining the lists of the owned robust of
> pi mutexes are same, and in fact you could see some non-trivial traces
> of this in the _mutex_fork() reimplementation in my patch.
>
> Linux and Solaris get (large enough) structs early enough to avoid the ABI
> issues.  I remember Linux changing FILE layout in early days of glibc 2.0
> and resulting pain, while they already had the GNU symbol versioning
> working and used.

I guess the issue now is the apparent speedups without having the
extra de-reference.  8-10% for things like mysql might be worth
considering the userland structs.

-- 
DE



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