From: Pierre Peiffer <pierre.peiffer@bull.net>
To: Ulrich Drepper <drepper@redhat.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
"Dinakar Guniguntala" <dino@in.ibm.com>,
"Jean-Pierre Dion" <jean-pierre.dion@bull.net>,
"Ingo Molnar" <mingo@elte.hu>, "Jakub Jelinek" <jakub@redhat.com>,
"Darren Hart" <dvhltc@us.ibm.com>,
"Sébastien Dugué" <sebastien.dugue@bull.net>
Subject: Re: [PATCH 2.6.20-rc4 1/4] futex priority based wakeup
Date: Wed, 10 Jan 2007 12:47:21 +0100 [thread overview]
Message-ID: <45A4D249.8080904@bull.net> (raw)
In-Reply-To: <45A3C2CE.7070500@redhat.com>
Ulrich Drepper a écrit :
>
> I have never seen performance numbers for this. If it is punishing
> existing code in a measurable way I think it's not anacceptable default
> behavior.
>
Here are some numbers. My test program measures the latency of pthread_broadcast
with 1000 pthreads (all threads are blocked on pthread_cond_wait, the time is
measured between the broadcast call and the last woken pthread).
Here are the average latencies after 5000 measures.
[only this patch is used, not the following.
The system is a dual Xeon 2.80GHz with HT enable]
First case: all threads are SCHED_OTHER
* with simple list:
Iterations=5000
Latency (us) min max avg stddev
3869 7400 6656.73 539.35
* with plist:
Iterations=5000
Latency (us) min max avg stddev
3684 7629 6787.97 479.41
Second case: all threads are SCHED_FIFO with priority equally distributed from
priomin to priomax
* with simple list:
Iterations=5000
Latency (us) min max avg stddev
4548 7197 6656.85 463.30
* with plist:
Iterations=5000
Latency (us) min max avg stddev
8289 11752 9720.12 426.45
So, yes it (logically) has a cost, depending of the number of different
priorities used, so it's specially measurable with real-time threads.
With SCHED_OTHER, I suppose that the priorities are not be very distributed.
May be, supposing it makes sense to respect the priority order only for
real-time pthreads, I can register all SCHED_OTHER threads to the same
MAX_RT_PRIO priotity ?
Or do you think this must be set behind a CONFIG* option ?
(Or finally not interesting enough for mainline ?)
--
Pierre
next prev parent reply other threads:[~2007-01-10 11:48 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <45A3B330.9000104@bull.net>
2007-01-09 16:16 ` [PATCH 2.6.20-rc4 1/4] futex priority based wakeup Pierre Peiffer
2007-01-09 16:29 ` Ulrich Drepper
2007-01-10 11:47 ` Pierre Peiffer [this message]
2007-01-10 12:03 ` Pierre Peiffer
2007-01-10 12:54 ` Jakub Jelinek
2007-01-10 15:05 ` Pierre Peiffer
2007-01-10 18:15 ` Ulrich Drepper
2007-01-11 7:20 ` Ulrich Drepper
2007-01-09 17:59 ` Daniel Walker
2007-01-10 16:11 ` Daniel Walker
2007-01-10 16:29 ` Pierre Peiffer
2007-01-10 16:33 ` Daniel Walker
2007-01-09 16:16 ` [PATCH 2.6.20-rc4 2/4] Make futex_wait() use an hrtimer for timeout Pierre Peiffer
2007-01-09 16:20 ` [PATCH 2.6.20-rc4 3/4] futex_requeue_pi optimization Pierre Peiffer
2007-01-09 16:33 ` Ulrich Drepper
2007-01-10 8:17 ` Pierre Peiffer
2007-01-10 8:24 ` Ulrich Drepper
2007-01-09 16:25 ` [PATCH 2.6.20-rc4 4/4][RFC] sys_futex64 : allows 64bit futexes Pierre Peiffer
2007-01-11 21:49 ` Andrew Morton
2007-01-11 22:14 ` Jakub Jelinek
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=45A4D249.8080904@bull.net \
--to=pierre.peiffer@bull.net \
--cc=dino@in.ibm.com \
--cc=drepper@redhat.com \
--cc=dvhltc@us.ibm.com \
--cc=jakub@redhat.com \
--cc=jean-pierre.dion@bull.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=sebastien.dugue@bull.net \
/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