libthr shared locks

Daniel Eischen deischen at
Sun Dec 27 16:44:52 UTC 2015

On Sun, 27 Dec 2015, Konstantin Belousov wrote:

> On Sat, Dec 26, 2015 at 12:15:43PM -0500, Daniel Eischen wrote:
[ snipped for brevity ]
>> I agree, but the work that you are doing now would be basically
>> thrown out later on.  I will not stand in your way and appreciate
>> any work you do.  I would just rather that the struct change be
>> made now for 11, even without any pshared or other changes.  For
>> once the struct change is made, pshared or other additions can
>> be made afterward, even in the 11 branch because they would not
>> break the ABI.
> Lock inlining was not done for ten years, now cost of doing it is
> extremely high, as discussed above.  Who would drive the change, and
> with what time frame ?  If me, I seriosly consider renaming libthr
> to libthr2, but I had no time to think much about it.

I could probably do the inlining of locks, pulling out that part
of it from David's patch, and coordinating with you so we don't
step on each other's toes.  Perhaps just making the first element
of the structs a self-reference at first, would help mitigate

I'm not sure what renaming libthr to libthr2 solves that a
version bump can't also.  Can't we still tell whether both and have been loaded?  Perhaps libthr2
is cleaner WRT keeping the old ABI (it could be dropped?).

> Right now, I think that I want to commit my current patch and implement
> robust mutexes as the next step, without ABI breakage. At least, this
> seems to have fixed time-frame and can be made ready for 11.x. Lock
> inlining might be not. Are there serious objections against the plan,
> except that (lock inlining + pshared) is ideal situation, while the plan
> is not (but more practical) ?

What is the timeframe for 11.0-RELEASE?  If not for 11.0, I would
like to see it done soon in the 12-current branch afterward.
In my mind, any pain will be the same in 11 or 12, nothing really
is gained by waiting, only by not doing it (inlining locks) ever.


More information about the freebsd-threads mailing list