[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <63bbeec6-718f-49ad-974d-fb3958bd1564@igalia.com>
Date: Wed, 4 Sep 2024 10:23:26 -0300
From: André Almeida <andrealmeid@...lia.com>
To: Edward Liaw <edliaw@...gle.com>
Cc: linux-kernel@...r.kernel.org, Frederic Weisbecker <frederic@...nel.org>,
Bill Wendling <morbo@...gle.com>, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Anna-Maria Behnsen
<anna-maria@...utronix.de>, Shuah Khan <shuah@...nel.org>,
Peter Zijlstra <peterz@...radead.org>, Marco Elver <elver@...gle.com>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Davidlohr Bueso <dave@...olabs.net>, Nathan Chancellor <nathan@...nel.org>,
Stephen Boyd <sboyd@...nel.org>, Oleg Nesterov <oleg@...hat.com>,
Justin Stitt <justinstitt@...gle.com>, Dmitry Vyukov <dvyukov@...gle.com>,
Darren Hart <dvhart@...radead.org>, linux-kselftest@...r.kernel.org,
kernel-team@...roid.com, Muhammad Usama Anjum <usama.anjum@...labora.com>,
Davidlohr Bueso <dbueso@...e.de>, llvm@...ts.linux.dev,
John Stultz <jstultz@...gle.com>
Subject: Re: [PATCH RESEND] selftests/futex: Order calls in futex_requeue
Hi Edward,
Thanks for your patch!
Em 03/09/2024 17:39, Edward Liaw escreveu:
> Similar to fbf4dec70277 ("selftests/futex: Order calls to
> futex_lock_pi"), which fixed a flake in futex_lock_pi due to racing
> between the parent and child threads.
>
> The same issue can occur in the futex_requeue test, because it expects
> waiterfn to make progress to futex_wait before the parent starts to
> requeue. This is mitigated by the parent sleeping for WAKE_WAIT_US, but
> it still fails occasionally. This can be reproduced by adding a sleep in
> the waiterfn before futex_wait:
>
> TAP version 13
> 1..2
> not ok 1 futex_requeue simple returned: 0
> not ok 2 futex_requeue simple returned: 0
> not ok 3 futex_requeue many returned: 0
> not ok 4 futex_requeue many returned: 0
>
> Instead, replace the sleep with barriers to make the sequencing
> explicit.
>
Reviewed-by: André Almeida <andrealmeid@...lia.com>
Powered by blists - more mailing lists