Re: [PATCH v9] linux: Do not spawn a new thread for SIGEV_THREAD (BZ 30558, 27895, 29705, 32833)

Carlos O'Donell <[email protected]>
Newsgroups gmane.comp.lib.glibc.alpha
Organization Red Hat, LLC.
Message-ID <[email protected]>
On 7/10/26 10:24 AM, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>> The current timer_create SIGEV_THREAD implementation has some
>> downsides:
>>
>>    1. There is no way to report failure at thread creation when a
>>       timer triggers.  It means that it might occur unreported and with
>>       missed events depending of the system load.
> 
> Error reporting can be added to the existing implementation, by
> incrementing a counter on pthread_create failure and returning the sum
> of this counter and the kernel counter in timer_getoverrun, I believe.

You could also fall back to the 1 thread you created via timer_create to
make serial progress in the worst case.

This is the suggestion that Rich makes in comment 28:
https://sourceware.org/bugzilla/show_bug.cgi?id=30558#c28

> I think changing from multiple threads to a single serialized thread is
> quite drastic and may not be what applications expect.  We might need
> another round of compatibility symbols for that.
That's a good point I hadn't considered, but I did comment on it in my
v9 review.

-- 
Cheers,
Carlos.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.