From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Julius Werner <jwerner@chromium.org>
Cc: linux-kernel@vger.kernel.org, len.brown@intel.com,
khilman@ti.com, rjw@sisk.pl, deepthi@linux.vnet.ibm.com,
akpm@linux-foundation.org, g.trinabh@gmail.com,
snanda@chromium.org,
Lists Linaro-dev <linaro-dev@lists.linaro.org>
Subject: Re: [PATCH] cpuidle: reinitialize power_usage values when adding/removing C-states
Date: Thu, 18 Oct 2012 10:21:52 +0200 [thread overview]
Message-ID: <507FBC20.50004@linaro.org> (raw)
In-Reply-To: <CAODwPW8CfgLQS+933ZQSueiat3QrAtRZh98h3iqtN8vxBOy=qg@mail.gmail.com>
On 10/17/2012 08:43 PM, Julius Werner wrote:
>> This is specific to the acpi and should be handled in the
>> processor_idle.c file instead of the cpuidle core code.
>>
>> Could be the function 'acpi_processor_cst_has_changed' the right place
>> to set a dummy power value for the power in the new C-state ?
>
> Thanks for your feedback. I think it wouldn't be wise to split the
> dummy power value logic over two places, but I could submit a patch
> that makes set_power_states globally accessible and calls it from
> acpi_processor_cst_has_changed instead.
No please, do not export this function. That will add more confusion on
the acpi code and more generally in the cpuidle core code.
IIUC, a new state is inserted/deleted and we will set the entire array
of states to setup the power.
You have the acpi_processor_cst_has_changed function calling the
acpi_processor_setup_cpuidle_states function. It seems to be a good
candidate to setup the power of the new state. All the states are filled
again AFAICS under the lock.
> However, I do not think this should really be ACPI specific. It
> applies to any cpuidle driver that wants to change its idle states at
> runtime. Currently only the ACPI one does, but the future might bring
> others that would run into the same problem. I also think that
> set_power_states fits much better into cpuidle_enable_device
> conceptually anyway (right next to poll_idle_init which also does
> state initialization).
The states are now part of the cpuidle driver and the set_power_states
should remain to this file. The dynamic C-states brought some complexity
in the acpi code and honestly this code is very confusing.
Maybe one day, that would make sense but until then I am in favor of
keeping the arch specific bits in the drivers, especially when they are
*hum* so "complex".
poll_idle_init looks hackish for me and probably move it to the arch
would also make sense.
Thanks
-- Daniel
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
next prev parent reply other threads:[~2012-10-18 8:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-16 22:39 [PATCH] cpuidle: reinitialize power_usage values when adding/removing C-states Julius Werner
2012-10-17 10:31 ` Daniel Lezcano
2012-10-17 10:44 ` Daniel Lezcano
2012-10-17 18:43 ` Julius Werner
2012-10-18 8:21 ` Daniel Lezcano [this message]
2012-10-19 21:50 ` [PATCH] acpi/cpuidle: " Julius Werner
2012-10-20 21:50 ` Daniel Lezcano
2012-10-22 17:13 ` Julius Werner
2012-10-22 17:21 ` Daniel Lezcano
2012-11-12 20:26 ` [RFC] cpuidle - remove the power_specified field in the driver Daniel Lezcano
2012-11-12 21:09 ` Julius Werner
2012-11-12 22:08 ` Daniel Lezcano
2012-11-18 8:40 ` Francesco Lavra
2012-11-18 9:17 ` Daniel Lezcano
2012-12-10 19:09 ` Julius Werner
2012-12-10 22:41 ` Rafael J. Wysocki
2012-12-11 9:46 ` Daniel Lezcano
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=507FBC20.50004@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=akpm@linux-foundation.org \
--cc=deepthi@linux.vnet.ibm.com \
--cc=g.trinabh@gmail.com \
--cc=jwerner@chromium.org \
--cc=khilman@ti.com \
--cc=len.brown@intel.com \
--cc=linaro-dev@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=snanda@chromium.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).