Re: [PATCH] [v2] test_rhashtable: remove semaphore usage

From: Geert Uytterhoeven
Date: Wed Jan 02 2019 - 05:05:27 EST

Hi Arnd,

On Sun, Dec 16, 2018 at 8:50 PM Arnd Bergmann <arnd@xxxxxxxx> wrote:
> This is one of only two files that initialize a semaphore to a negative
> value. We don't really need the two semaphores here at all, but can do
> the same thing in more conventional and more effient way, by using a
> single waitqueue and an atomic thread counter.
> This gets us a little bit closer to eliminating classic semaphores from
> the kernel. It also fixes a corner case where we fail to continue after
> one of the threads fails to start up.
> An alternative would be to use a split kthread_create()+wake_up_process()
> and completely eliminate the separate synchronization.
> Acked-by: Phil Sutter <phil@xxxxxx>
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> ---
> Changes from v1:
> - rebase to mainline,
> - fix pr_err() output
> - bail out if interrupted

Now this is upstream as 809c67059162e7ba ("test_rhashtable: remove
semaphore usage"), I gave test_rhashtable a try again on m68k/ARAnyM.
And it succeeded, without my workaround from
Interestingly, it still succeeded without the workaround after reverting
809c67059162e7ba, so some other change during the last two years must
have fixed this.

I have no plans to bisect this, though.



Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds