Deutsch   English   Français   Italiano  
<vb51oo$2v0pc$3@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: news.eternal-september.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Newsgroups: comp.lang.c++
Subject: Re: Futexes ain't fast
Date: Mon, 2 Sep 2024 11:56:24 -0700
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <vb51oo$2v0pc$3@dont-email.me>
References: <van414$3fe9t$1@raubtier-asyl.eternal-september.org>
 <vashj8$gpjk$1@dont-email.me> <vat7ft$k5je$7@dont-email.me>
 <vatohm$mu0b$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 02 Sep 2024 20:56:24 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="37ad5ea9d8adc5b106b971373399347c";
	logging-data="3113772"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/XYUtL1tDNKbYwKtAUfB6cRD3fDuRirf0="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:lVRmMciKPd2tNylzZ7U0p4SJubY=
In-Reply-To: <vatohm$mu0b$1@dont-email.me>
Content-Language: en-US

On 8/30/2024 5:36 PM, jseigh wrote:
> On 8/30/24 15:45, Chris M. Thomasson wrote:
>> On 8/30/2024 6:31 AM, jseigh wrote:
> ...
>>>
>>> They don't have to be fast, they just have to allow correct 
>>> synchronization
>>> and allow performant fast paths.  Can the api be improved for the 
>>> latter?
>>> Certainly yes.  It is an awkward api to use.
>>
>> 100% agreed. Eventcounts are in the mix as well.
>>
> 
> You might take a look at folly's eventcount.  It (I think) only calls
> futex wake if there are waiters, and only calls futex_wait if the
> eventcount hasn't been incremented.  I did my own C version since I'm
> working in C for now.

I need to look at it. Have been really busy lately. I think you said 
that eventcounts can be a little "too" lock-free? ;^)