[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240403150343.GC31764@redhat.com>
Date: Wed, 3 Apr 2024 17:03:43 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: John Stultz <jstultz@...gle.com>, Marco Elver <elver@...gle.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
Dmitry Vyukov <dvyukov@...gle.com>, kasan-dev@...glegroups.com,
Edward Liaw <edliaw@...gle.com>,
Carlos Llamas <cmllamas@...gle.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH v6 1/2] posix-timers: Prefer delivery of signals to the
current thread
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/
Oleg.
Powered by blists - more mailing lists