lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <507E8C09.3060407@linaro.org>
Date:	Wed, 17 Oct 2012 12:44:25 +0200
From:	Daniel Lezcano <daniel.lezcano@...aro.org>
To:	Julius Werner <jwerner@...omium.org>
CC:	khilman@...com, len.brown@...el.com, g.trinabh@...il.com,
	Lists Linaro-dev <linaro-dev@...ts.linaro.org>,
	deepthi@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org,
	rjw@...k.pl, akpm@...ux-foundation.org, snanda@...omium.org
Subject: Re: [PATCH] cpuidle: reinitialize power_usage values when adding/removing
 C-states

On 10/17/2012 12:31 PM, Daniel Lezcano wrote:
> On 10/17/2012 12:39 AM, Julius Werner wrote:
>> When cpuidle drivers do not supply explicit power_usage values,
>> cpuidle/driver.c inserts dummy values instead. When a running processor
>> dynamically gains new C-states (e.g. after ACPI events), the power_usage
>> values of those states will stay uninitialized, and cpuidle governors
>> will never choose to enter them.
>>
>> This patch moves the dummy value initialization from
>> cpuidle_register_driver to cpuidle_enable_device, which drivers such as
>> acpi/processor_idle.c will call again when they add or remove C-states.
>> Tested and verified on an Acer AC700 Chromebook, which supports the C3
>> state only when it switches from AC to battery power.
>>
>> Signed-off-by: Julius Werner <jwerner@...omium.org>
>> ---
> 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 ?

btw, good catch ! :)



-- 
 <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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ