lkml.org 
[lkml]   [2024]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v6 1/2] posix-timers: Prefer delivery of signals to the current thread
Date
On Wed, Apr 03 2024 at 17:03, Oleg Nesterov wrote:
> On 04/03, Thomas Gleixner wrote:
>> The test if fragile as hell as there is absolutely no guarantee that the
>> signal target distribution is as expected. The expectation is based on a
>> statistical assumption which does not really hold.
>
> Agreed. I too never liked this test-case.
>
> I forgot everything about this patch and test-case, I can't really read
> your patch right now (sorry), so I am sure I missed something, but
>
>> static void *distribution_thread(void *arg)
>> {
>> - while (__atomic_load_n(&remain, __ATOMIC_RELAXED));
>> - return NULL;
>> + while (__atomic_load_n(&remain, __ATOMIC_RELAXED) && !done) {
>> + if (got_signal)
>> + usleep(10);
>> + }
>> +
>> + return (void *)got_signal;
>> }
>
> Why distribution_thread() can't simply exit if got_signal != 0 ?
>
> See https://lore.kernel.org/all/20230128195641.GA14906@redhat.com/

Indeed. It's too obvious :)

\
 
 \ /
  Last update: 2024-05-27 16:22    [W:0.178 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site