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
| ||
|
Date: Thu, 15 May 2014 10:09:47 +0530 From: Viresh Kumar <viresh.kumar@...aro.org> To: Stratos Karafotis <stratosk@...aphore.gr> Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>, "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org> Subject: Re: [PATCH RESEND] cpufreq: Break out early when frequency equals target_freq On 14 May 2014 23:35, Stratos Karafotis <stratosk@...aphore.gr> wrote: > Many drivers keep frequencies in frequency table in ascending > or descending order. When governor tries to change to policy->min > or policy->max respectively then the cpufreq_frequency_table_target > could return on first iteration. This will save some iteration cycles. > > So, break out early when a frequency in cpufreq_frequency_table > equals to target one. > > Testing this during kernel compilation using ondemand governor > with a frequency table in ascending order, the > cpufreq_frequency_table_target returned early on the first > iteration at about 30% of times called. > > Signed-off-by: Stratos Karafotis <stratosk@...aphore.gr> > --- > drivers/cpufreq/freq_table.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) Acked-by: Viresh Kumar <viresh.kumar@...aro.org> -- 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