Re: git: a6c0d801ca59 - main - libpthread: allocate rwlocks and spinlocks in dedicated cachelines

From: Mateusz Guzik <mjguzik_at_gmail.com>
Date: Tue, 27 Jun 2023 13:47:05 UTC
On 6/27/23, Konstantin Belousov <kostikbel@gmail.com> wrote:
> On Tue, Jun 27, 2023 at 11:56:55AM +0000, Mateusz Guzik wrote:
>> The branch main has been updated by mjg:
>>
>> URL:
>> https://cgit.FreeBSD.org/src/commit/?id=a6c0d801ca5934bb9b9cca6870ea7406d5db0641
>>
>> commit a6c0d801ca5934bb9b9cca6870ea7406d5db0641
>> Author:     Greg Becker <becker.greg@att.net>
>> AuthorDate: 2023-06-27 01:08:29 +0000
>> Commit:     Mateusz Guzik <mjg@FreeBSD.org>
>> CommitDate: 2023-06-27 11:56:44 +0000
>>
>>     libpthread: allocate rwlocks and spinlocks in dedicated cachelines
> Why e.g. mutexes were not handled in the similar way?
>

Sorting out the general problem looks like quite a bit of churn.

For example the aforementioned mutexes end up with __thr_calloc ->
__crt_calloc which does not provide alignment support afaics.

The above patch sorts out some of the problem in a trivial manner, so
I saw no issue putting it in.

-- 
Mateusz Guzik <mjguzik gmail.com>