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]
Date:	Thu, 15 Jul 2010 21:07:13 -0700
From:	Arjan van de Ven <arjan@...ux.intel.com>
To:	Ai Li <aili@...eaurora.org>
CC:	akpm@...ux-foundation.org, dwalker@...eaurora.org, mingo@...e.hu,
	shemminger@...tta.com, czoccolo@...il.com, len.brown@...el.com,
	linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
	linux-pm@...ts.linux-foundation.org
Subject: Re: [PATCH] cpuidle: extend cpuidle and menu governor to handle dynamic
 states

On 7/15/2010 1:30 PM, Ai Li wrote:

I'm ok with the general idea, but have a few comments about the 
implementation
> Signed-off-by: Ai Li<aili@...eaurora.org>
> ---
>   drivers/cpuidle/governors/menu.c |   59 +++++++++++++++++++++++++++++--------
>   include/linux/cpuidle.h          |    4 ++
>   2 files changed, 50 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
> index 1b12870..b3854cc 100644
> --- a/drivers/cpuidle/governors/menu.c
> +++ b/drivers/cpuidle/governors/menu.c
> @@ -271,6 +271,9 @@ static int menu_select(struct cpuidle_device *dev)
>
>   	detect_repeating_patterns(data);
>
> +	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;
it's up to the menu governor to then pick a good one, not for the 
platform to muck with things
based on this.

Also I would like the cpuidle code, not the governor, to call this 
prepare function.
The need to call ->prepare is governor independent....



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

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