From: "André Almeida" <andrealmeid@igalia.com>
To: Edward Liaw <edliaw@google.com>
Cc: linux-kernel@vger.kernel.org,
Frederic Weisbecker <frederic@kernel.org>,
Bill Wendling <morbo@google.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Anna-Maria Behnsen <anna-maria@linutronix.de>,
Shuah Khan <shuah@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Marco Elver <elver@google.com>,
Nick Desaulniers <ndesaulniers@google.com>,
Davidlohr Bueso <dave@stgolabs.net>,
Nathan Chancellor <nathan@kernel.org>,
Stephen Boyd <sboyd@kernel.org>, Oleg Nesterov <oleg@redhat.com>,
Justin Stitt <justinstitt@google.com>,
Dmitry Vyukov <dvyukov@google.com>,
Darren Hart <dvhart@infradead.org>,
linux-kselftest@vger.kernel.org, kernel-team@android.com,
Muhammad Usama Anjum <usama.anjum@collabora.com>,
Davidlohr Bueso <dbueso@suse.de>,
llvm@lists.linux.dev, John Stultz <jstultz@google.com>
Subject: Re: [PATCH RESEND] selftests/futex: Order calls in futex_requeue
Date: Wed, 4 Sep 2024 10:23:26 -0300 [thread overview]
Message-ID: <63bbeec6-718f-49ad-974d-fb3958bd1564@igalia.com> (raw)
In-Reply-To: <20240903203915.3383774-1-edliaw@google.com>
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@igalia.com>
prev parent reply other threads:[~2024-09-04 13:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 20:39 [PATCH RESEND] selftests/futex: Order calls in futex_requeue Edward Liaw
2024-09-04 13:23 ` André Almeida [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=63bbeec6-718f-49ad-974d-fb3958bd1564@igalia.com \
--to=andrealmeid@igalia.com \
--cc=anna-maria@linutronix.de \
--cc=dave@stgolabs.net \
--cc=dbueso@suse.de \
--cc=dvhart@infradead.org \
--cc=dvyukov@google.com \
--cc=edliaw@google.com \
--cc=elver@google.com \
--cc=frederic@kernel.org \
--cc=jstultz@google.com \
--cc=justinstitt@google.com \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mingo@redhat.com \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=sboyd@kernel.org \
--cc=shuah@kernel.org \
--cc=tglx@linutronix.de \
--cc=usama.anjum@collabora.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox