From: Nathan Lynch <ntl@pobox.com>
To: linux-kernel@vger.kernel.org
Cc: linuxppc-dev@ozlabs.org, Ingo Molnar <mingo@elte.hu>,
Paul Mackerras <paulus@samba.org>,
Anton Blanchard <anton@samba.org>
Subject: [RFC/PATCH 0/3] sched: allow arch override of cpu power
Date: Wed, 18 Jun 2008 19:29:31 -0500 [thread overview]
Message-ID: <1213835374-10868-1-git-send-email-ntl@pobox.com> (raw)
There is an "interesting" quality of POWER6 cores, which each have 2
hardware threads: assuming one thread on the core is idle, the primary
thread is a little "faster" than the secondary thread. To illustrate:
for cpumask in 0x1 0x2 ; do
taskset $cpumask /usr/bin/time -f "%e elapsed, %U user, %S sys" \
/bin/sh -c "i=1000000 ; while (( i-- )) ; do : ; done"
done
17.05 elapsed, 16.83 user, 0.22 sys
17.54 elapsed, 17.32 user, 0.22 sys
(The first result is for a primary thread; the second result for a
secondary thread.)
So it would be nice to have the scheduler slightly prefer primary
threads on POWER6 machines. These patches, which allow the
architecture to override the scheduler's CPU "power" calculation, are
one possible approach, but I'm open to others. Please note: these
seemed to have the desired effect on 2.6.25-rc kernels (2-3%
improvement in a kernbench-like make -j <nr_cores>), but I'm not
seeing this improvement with 2.6.26-rc kernels for some reason I am
still trying to track down.
Nathan Lynch (3):
sched: support arch override of sched_group cpu power
add cpu_power to machdep_calls, override SD_SIBLING_INIT
adjust cpu power for secondary threads on POWER6
arch/powerpc/kernel/setup-common.c | 7 ++++++
arch/powerpc/platforms/pseries/setup.c | 37 ++++++++++++++++++++++++++++++++
include/asm-powerpc/cputable.h | 3 +-
include/asm-powerpc/machdep.h | 2 +
include/asm-powerpc/topology.h | 31 ++++++++++++++++++++++++++
include/linux/sched.h | 1 +
kernel/sched.c | 14 ++++++++++++
7 files changed, 94 insertions(+), 1 deletions(-)
next reply other threads:[~2008-06-19 0:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-19 0:29 Nathan Lynch [this message]
2008-06-19 0:29 ` [RFC/PATCH 1/3] sched: support arch override of sched_group cpu power Nathan Lynch
2008-06-19 0:29 ` [RFC/PATCH 2/3] add cpu_power to machdep_calls, override SD_SIBLING_INIT Nathan Lynch
2008-06-19 0:29 ` [RFC/PATCH 3/3] adjust cpu power for secondary threads on POWER6 Nathan Lynch
2008-06-19 2:58 ` Olof Johansson
2008-06-19 3:03 ` Olof Johansson
2008-06-19 9:50 ` [RFC/PATCH 0/3] sched: allow arch override of cpu power Ingo Molnar
2008-06-19 17:09 ` Nathan Lynch
2008-06-26 19:49 ` Breno Leitao
2008-06-27 14:23 ` Nathan Lynch
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=1213835374-10868-1-git-send-email-ntl@pobox.com \
--to=ntl@pobox.com \
--cc=anton@samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.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 NNTP newsgroup(s).