From: DJ Delorie <dj@redhat.com>
To: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH v3] i386: Use pthread_barrier for synchronization on tst-bz21269
Date: Thu, 02 Mar 2023 15:21:22 -0500 [thread overview]
Message-ID: <xna60u7vlp.fsf@greed.delorie.com> (raw)
In-Reply-To: <9375da3a-1faf-245e-4d39-2ec4d2638563@linaro.org>
Adhemerval Zanella Netto <adhemerval.zanella@linaro.org> writes:
>> + /* Give the thread a chance to get into it's busy loop. */
>> + usleep (5);
>
> ... I shivers every time I see sleep used as synchronization mechanism, since
> most likely in some environment the sleep won't work as expected due
> scheduling pressuer and we will end up with a false positive.
Yeah, I'm using as just a "yeild if you can" operation. The code works
without it, but not in the way the test is intended.
> I am wondering if it would be better to just remove this test saying we
> can't really make it work reliable.
I'm not opposed to removing it. Even with the fixed I put in, the test
is still more likely to fault "for some reason" than for the expected
reason.
next prev parent reply other threads:[~2023-03-02 20:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-24 16:15 Adhemerval Zanella
2023-02-27 22:21 ` DJ Delorie
2023-02-28 14:29 ` Adhemerval Zanella Netto
2023-03-02 5:10 ` DJ Delorie
2023-03-02 17:00 ` Adhemerval Zanella Netto
2023-03-02 20:21 ` DJ Delorie [this message]
2023-03-08 18:01 ` Adhemerval Zanella Netto
2023-05-10 21:31 ` DJ Delorie
2023-05-15 18:33 ` Adhemerval Zanella Netto
2023-05-16 19:10 ` DJ Delorie
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=xna60u7vlp.fsf@greed.delorie.com \
--to=dj@redhat.com \
--cc=adhemerval.zanella@linaro.org \
--cc=libc-alpha@sourceware.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).