From: "Ai Li" <aili@codeaurora.org>
To: 'Arjan van de Ven' <arjan@linux.intel.com>
Cc: akpm@linux-foundation.org, dwalker@codeaurora.org, mingo@elte.hu,
shemminger@vyatta.com, czoccolo@gmail.com, len.brown@intel.com,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-pm@lists.linux-foundation.org
Subject: RE: [PATCH] cpuidle: extend cpuidle and menu governor to handle dynamic states
Date: Fri, 16 Jul 2010 11:25:27 -0600 [thread overview]
Message-ID: <000001cb250b$e2813e60$a783bb20$@org> (raw)
In-Reply-To: <4C3FDAF1.7030107@linux.intel.com>
> > + if (dev->prepare)
> > + dev->prepare(dev, data->predicted_us);
> >
>
> I don't like the idea of passing predicted_us here.
> the states and their updates should be independent of how long we
> think we'll be idle;
The power_usage value, total or average, would depend on how long the
predicted idle period is. On our SoCs, a cpuidle state has three
stages: entry stage, low power stage, and exit stage. Entry and exit
stages consume more power than the low power stage but have fixed
durations, irrespective how long the idle period is. As the
predicted idle period changes, the entry and exit duration stay the
same but the low power duration changes, resulting in different total
or average power for the idle period.
> Also I would like the cpuidle code, not the governor, to call this
> prepare function.
> The need to call ->prepare is governor independent....
I agree that it would be cleaner to call ->prepare from the cpuidle
code. But if we need values calculated in the governor's select
function, I'm not sure what is the best way to do that from cpuidle
code.
> + if (dev->compare_power) {
>
> I'm not a big fan of this as a flag; either we always do this,
> which I
> can understand, or we sort things, which is also fine with me.
> Doing this condition like this.... not a fan.
One of the concerns I have is backwards compatibility. As far as I
know, none of the current cpuidle drivers use the power_usage field.
If we always do compare_power, those drivers would break until
someone with technical device knowledge update the drivers to specify
power... I could derive fake power_usage numbers by default, using
the cstate index position. That seems kind of hacky but it would
remove the need for the compare_power flag and retain the current
behavior when cpuidle drivers do not provide their own power numbers.
~Ai
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
next prev parent reply other threads:[~2010-07-16 17:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-15 20:30 [PATCH] cpuidle: extend cpuidle and menu governor to handle dynamic states Ai Li
2010-07-16 4:07 ` Arjan van de Ven
2010-07-16 17:25 ` Ai Li [this message]
2010-07-16 17:28 ` Arjan van de Ven
2010-07-16 19:19 ` Ai Li
2010-07-16 19:33 ` Arjan van de Ven
2010-07-16 19:52 ` Ai Li
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='000001cb250b$e2813e60$a783bb20$@org' \
--to=aili@codeaurora.org \
--cc=akpm@linux-foundation.org \
--cc=arjan@linux.intel.com \
--cc=czoccolo@gmail.com \
--cc=dwalker@codeaurora.org \
--cc=len.brown@intel.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=mingo@elte.hu \
--cc=shemminger@vyatta.com \
/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).