From: Con Kolivas <kernel@kolivas.org>
To: Muli Ben-Yehuda <mulix@mulix.org>
Cc: Marcel Zalmanovici <MARCEL@il.ibm.com>, linux-kernel@vger.kernel.org
Subject: Re: Inconsistent timing results of multithreaded program on an SMP machine.
Date: Sun, 20 Nov 2005 21:39:00 +1100 [thread overview]
Message-ID: <200511202139.01299.kernel@kolivas.org> (raw)
In-Reply-To: <20051120103536.GB12997@granada.merseine.nu>
On Sun, 20 Nov 2005 21:35, Muli Ben-Yehuda wrote:
> On Sun, Nov 20, 2005 at 09:28:13PM +1100, Con Kolivas wrote:
> > Ok I've had a look at the actual program now ;) Are you timing the time
> > it takes to completion of everything?
> >
> > This part of your program:
> > for (i= 0; i<8; i++)
> > pthread_join(tid[i], NULL);
> >
> > Cares about the order the threads finish. Do you think this might be
> > affecting your results?
>
> I don't see why it should matter. Depending on the order the threads
> finish, we will always wait in pthread_join until the last one
> finishes, and then do between 0 and 7 more pthread_joins that should
> return immediately (since the last one has already finished).
If it was instant it shouldn't matter. I'm aware of that in theory, but there
have certainly been reports of pthread_join taking quite a while happening in
a sort of lazy/sloppy way. I don't know why this is the case but I wondered
if it was showing up here.
Cheers,
Con
next prev parent reply other threads:[~2005-11-20 10:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-20 9:27 Marcel Zalmanovici
2005-11-20 9:54 ` Con Kolivas
2005-11-20 10:18 ` Marcel Zalmanovici
2005-11-20 10:28 ` Con Kolivas
2005-11-20 10:35 ` Muli Ben-Yehuda
2005-11-20 10:39 ` Con Kolivas [this message]
2005-11-20 10:43 ` Muli Ben-Yehuda
2005-11-20 10:50 ` Marcel Zalmanovici
2005-11-20 10:50 ` Con Kolivas
2005-11-20 10:43 ` Marcel Zalmanovici
2005-11-20 14:02 ` Paul Jackson
2005-11-24 9:50 ` Marcel Zalmanovici
[not found] <OF507D27BA.6B51F19A-ONC22570C3.002E62D2-C22570C3.002F0C99@il.ibm.com>
2005-11-24 9:40 ` Con Kolivas
2005-11-24 10:00 ` Marcel Zalmanovici
2005-11-24 12:43 ` Paul Jackson
2005-12-04 15:26 ` Marcel Zalmanovici
2005-12-04 19:54 ` Paul Jackson
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=200511202139.01299.kernel@kolivas.org \
--to=kernel@kolivas.org \
--cc=MARCEL@il.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mulix@mulix.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
Powered by JetHome