Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Dec 2015 13:46:25 -0500 (EST)
From:      Daniel Eischen <deischen@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        freebsd-arch@freebsd.org, Konstantin Belousov <kostikbel@gmail.com>, freebsd-threads@freebsd.org
Subject:   Re: libthr shared locks
Message-ID:  <Pine.GSO.4.64.1512241338340.10649@sea.ntplx.net>
In-Reply-To: <5496837.TbTQtANDNj@ralph.baldwin.cx>
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>

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

> On Thursday, December 24, 2015 08:45:38 AM Daniel Eischen wrote:
>> We would include extra/spare words in the struct from day 1.
>> The public struct should just consist of an array of storage
>> units or similar, so that nothing can be gleaned from the
>> elements of the struct.  This is what Solaris does (or at least
>> used to).
>>
>> Going forward, I think the sync structures just need to be able
>> to be properly initialized with PTHREAD_FOO_INITIALIZER.  If
>> 10 years out the spare words are not enough, we could still
>> allocate remaining storage on first use like we do now.
>
> You can't allocate extra storage for the PSHARED case.  Any changes
> to PSHARED primitives that require altering the layout are full-blown
> ABI breakages the same as the one being contemplated here.

Yes, I know.  With spare slots and being able to move anything required
for shared to near the beginning of the struct, I think we'd be good
for quite a while anyway.

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.

-- 
DE



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