From: Joel Brobecker <brobecker@adacore.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] testsuite: pthread_cond_wait.exp: Avoid a race
Date: Tue, 12 Feb 2013 17:23:00 -0000 [thread overview]
Message-ID: <20130212172301.GH17107@adacore.com> (raw)
In-Reply-To: <20130212170358.GA5633@host2.jankratochvil.net>
> It is just too racy. I will check in the easy workaround below, it is
> sure not a real fix.
2 seconds feels much much much too long, however. I try to avoid
these types of delays, because collectively they make a significant
dent on the overall amount of time it takes to run the testsuite.
I am trying to think of a way to rewrite the program to avoid
the delay entirely, but I don't think it's possible, because
we need to the thread to run until it blocks in pthread_cond_wait.
Can we try a smaller value? For instance, if we went from 0.01
second to 0.1 seconds, we'd increase the time by a factor of 10.
In today's CPU times, 0.1 second enough to do a huge amount of
processing, no?
--
Joel
next prev parent reply other threads:[~2013-02-12 17:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-12 17:04 Jan Kratochvil
2013-02-12 17:23 ` Joel Brobecker [this message]
2013-02-12 17:30 ` Jan Kratochvil
2013-02-12 17:39 ` Joel Brobecker
2013-02-12 20:13 ` Tom Tromey
2013-02-14 15:25 ` [commit] " Jan Kratochvil
2013-02-12 17:41 ` Jan Kratochvil
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=20130212172301.GH17107@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.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