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, 7 Mar 2013 22:56:54 +0100 (CET)
From:	Guennadi Liakhovetski <g.liakhovetski@....de>
To:	Viresh Kumar <viresh.kumar@...aro.org>
cc:	rjw@...k.pl, Steve.Bannister@....com, linux@....linux.org.uk,
	linux-pm@...r.kernel.org,
	Sudeep KarkadaNagesha <sudeep.karkadanagesha@....com>,
	devicetree-discuss@...ts.ozlabs.org, Liviu.Dudau@....com,
	linux-kernel@...r.kernel.org, cpufreq@...r.kernel.org,
	robin.randhawa@....com, linux-arm-kernel@...ts.infradead.org,
	mark.hambleton@...adcom.com, linaro-kernel@...ts.linaro.org,
	charles.garcia-tobin@....com
Subject: Re: [PATCH V2] cpufreq: ARM big LITTLE: Add generic cpufreq driver
 and its DT glue

Hi Viresh

On Fri, 8 Mar 2013, Viresh Kumar wrote:

> big LITTLE is ARM's new Architecture focussing power/performance needs of modern
> world. More information about big LITTLE can be found here:
> 
> http://www.arm.com/products/processors/technologies/biglittleprocessing.php
> http://lwn.net/Articles/481055/
> 
> In order to keep cpufreq support for all big LITTLE platforms simple/generic,
> this patch tries to add a generic cpufreq driver layer for all big LITTLE
> platforms.

I like generic drivers :) cpufreq-cpu0 is yet another such generic 
(cpufreq) driver. Now, comparing the functionality of the two:

[snip]

> +/* Set clock frequency */
> +static int bL_cpufreq_set_target(struct cpufreq_policy *policy,
> +		unsigned int target_freq, unsigned int relation)
> +{
> +	struct cpufreq_freqs freqs;
> +	u32 cpu = policy->cpu, freq_tab_idx, cur_cluster;
> +	int ret = 0;
> +
> +	cur_cluster = cpu_to_cluster(policy->cpu);
> +
> +	freqs.old = bL_cpufreq_get(policy->cpu);
> +
> +	/* Determine valid target frequency using freq_table */
> +	cpufreq_frequency_table_target(policy, freq_table[cur_cluster],
> +			target_freq, relation, &freq_tab_idx);
> +	freqs.new = freq_table[cur_cluster][freq_tab_idx].frequency;
> +
> +	freqs.cpu = policy->cpu;
> +
> +	pr_debug("%s: cpu: %d, cluster: %d, oldfreq: %d, target freq: %d, new freq: %d\n",
> +			__func__, cpu, cur_cluster, freqs.old, target_freq,
> +			freqs.new);
> +
> +	if (freqs.old == freqs.new)
> +		return 0;
> +
> +	for_each_cpu(freqs.cpu, policy->cpus)
> +		cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
> +
> +	ret = clk_set_rate(clk[cur_cluster], freqs.new * 1000);

we see, that this driver "only" switches CPU clock frequencies. Whereas 
the cpufreq-cpu0 driver also manipulates a regulator (if available) 
directly. I understand, power-saving is also an important consideration 
for big.LITTLE systems. So, I presume, you plan to implement voltage 
switching in cpufreq notifiers? Now, my question is: is this (notifier) 
actually the preferred method and the cpufreq-cpu0 driver is doing it 
"wrongly?"

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
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