From: Arnd Bergmann <arnd@arndb.de>
To: cbe-oss-dev@ozlabs.org
Cc: parabelboi@bopserverein.de, Christian Krafft <krafft@de.ibm.com>,
cpufreq@lists.linux.org.uk
Subject: Re: [Cbe-oss-dev] [Patch] Resending: cell: add spu aware cpufreq governor
Date: Mon, 14 Apr 2008 02:21:41 +0200 [thread overview]
Message-ID: <200804140221.41726.arnd@arndb.de> (raw)
In-Reply-To: <20080128191225.092a6143@de.ibm.com>
Sorry for my late reply, I lost track of this discussion when it happened
during LCA and never got back to it. The patch looks good enough for 2.6.26,
I think, but one thing still really bothers me:
On Monday 28 January 2008, Christian Krafft wrote:
> +/* parts of this function should go into spu scheduler */
> +static int spu_gov_calc_load(struct spu_gov_info_struct *info)
> +{
> + unsigned long active_tasks; /* fixed-point */
> + int cpu, load;
> +
> + cpu = info->policy->cpu;
> + active_tasks = cbe_spu_info[cpu_to_node(cpu)].nr_active * FIXED_1;
> +
> + /* this is also a bit too trivial
> + * actually we want the max load of all spu's belonging together */
> + CALC_LOAD(info->load, EXP_1, active_tasks);
> +
> + load = (info->load + FIXED_1 / 200) >> FSHIFT;
> +
> + return load;
> +}
The nr_active variable in cbe_spu_info has a completely different meaning
from nr_active() in the linux scheduler. AFAICS, basing your computation
on this makes no sense whatsoever. Instead of looking at what threads are
running on the SPUs, you look at what is loaded. Because of our lazy loading
scheduler mechanism, a task occupying all SPUs at 10% of the time and
otherwise calling nanosleep or futex_wait will still show up as 100% load
here, so we don't lower the frequency although we should.
What's worse, a compute-intensive task running on half of the SPUs with the
rest of them being idle shows up as 50% load and causes the frequency to be
dropped to 50%, when it should run at full speed.
Arnd <><
next prev parent reply other threads:[~2008-04-14 0:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-18 16:11 Subject: cell: add spu aware cpufreq governor Christian Krafft
2008-01-19 21:38 ` [Cbe-oss-dev] " Arnd Bergmann
2008-01-28 18:03 ` Christian Krafft
2008-01-28 18:12 ` [Cbe-oss-dev] [Patch] Resending: " Christian Krafft
2008-04-14 0:21 ` Arnd Bergmann [this message]
2008-04-16 11:49 ` [Cbe-oss-dev] [Patch] Resending: cell_add_spuaware_cpufreq_governor.diff Christian Krafft
2008-04-16 12:08 ` Arnd Bergmann
2008-04-16 14:53 ` Christian Krafft
2008-01-21 3:09 ` [Cbe-oss-dev] Subject: cell: add spu aware cpufreq governor Akinobu Mita
2008-01-28 10:26 ` Christian Krafft
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=200804140221.41726.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=cbe-oss-dev@ozlabs.org \
--cc=cpufreq@lists.linux.org.uk \
--cc=krafft@de.ibm.com \
--cc=parabelboi@bopserverein.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.