From: Mike Chan <mike@android.com>
To: a.p.zijlstra@chello.nl, LKML <linux-kernel@vger.kernel.org>
Subject: sched: arch_scale_freq_power (and other cpu_power / sched related questions)
Date: Wed, 5 May 2010 19:35:14 -0700 [thread overview]
Message-ID: <s2i8bb80c381005051935zd5334eeby28865e9fdb206e55@mail.gmail.com> (raw)
Before I end up duplicating a bunch of work in the scheduler / cpufreq
/ power tracking. I wanted avoid such an figure out what exactly all
this existing code is doing. Right now I am just interested in how the
kernel is accounting for cpu power, and less on the actual load
balancing work. In particular, total power consumed over the lifetime
of the system, instead of what seems to be a diminished weighted scale
used for all the scheduler cpu_power calculations.
kernel/sched.c
First, the arch_scale_freq_power() hooks, what are the units that all
these calculations are based off of?
In update_cup_power() It seems "power" gets multiplied by
SCHED_LOAD_SCALE, then >> by SCHED_LOAD_SHIFT. (1024 *=1024) >> 10.
For Android, at least with omap, msm, tegra platforms I am attempting
to get cpu power tracking (with cpufreq support) and it looks like
there is some half-way support with x86.
It seems that for x86 the kernel returns the default value, which is
SCHED_LOAD_SCALE (1 << 10). Does anyone know how the magic number 1024
translates to cpu power consumption (with frequency scaling) in
relative or absolute power numbers.
-- Mike
next reply other threads:[~2010-05-06 2:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-06 2:35 Mike Chan [this message]
2010-05-06 7:01 ` Peter Zijlstra
2010-05-06 18:43 ` Mike Chan
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=s2i8bb80c381005051935zd5334eeby28865e9fdb206e55@mail.gmail.com \
--to=mike@android.com \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®