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: <CAOh2x==1ru3bddHnJOge=1rbpc6xwzKV5F5isJhAgwX_R=2TCw@mail.gmail.com>
Date:	Thu, 31 Jan 2013 14:28:56 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Fabio Baltieri <fabio.baltieri@...aro.org>
Cc:	"Rafael J. Wysocki" <rjw@...k.pl>, cpufreq@...r.kernel.org,
	linux-pm@...r.kernel.org, Linus Walleij <linus.walleij@...aro.org>,
	linaro-dev@...ts.linaro.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cpufreq: governors: implement generic policy_is_shared

On Thu, Jan 31, 2013 at 2:25 PM, Fabio Baltieri
<fabio.baltieri@...aro.org> wrote:
> On Thu, Jan 31, 2013 at 02:01:27PM +0530, Viresh Kumar wrote:
>> On 31 January 2013 13:44, Fabio Baltieri <fabio.baltieri@...aro.org> wrote:
>> > Implement a generic helper function policy_is_shared() to replace the
>> > current dbs_sw_coordinated_cpus() at cpufreq level, so that it can be
>> > used by code other than cpufreq governors.
>> >
>> > Suggested-by: Viresh Kumar <viresh.kumar@...aro.org>
>> > Signed-off-by: Fabio Baltieri <fabio.baltieri@...aro.org>
>> > ---
>> >  drivers/cpufreq/cpufreq_conservative.c | 2 +-
>> >  drivers/cpufreq/cpufreq_governor.c     | 8 --------
>> >  drivers/cpufreq/cpufreq_governor.h     | 1 -
>> >  drivers/cpufreq/cpufreq_ondemand.c     | 2 +-
>> >  include/linux/cpufreq.h                | 5 +++++
>>
>> Great,
>>
>> But, you missed few places:
>>
>> drivers/cpufreq/acpi-cpufreq.c:        if (bios_with_sw_any_bug &&
>> cpumask_weight(policy->cpus) == 1) {
>> drivers/cpufreq/cpufreq_stats.c:       if (policy &&
>> (cpumask_weight(policy->cpus) == 1)) {
>
> This doesn't look like the same thing to me!  Isn't this check here just
> to trigger during init (exit) on the first (last) cpu?  How would you
> replace it?

I don't think i am wrong, but i can be :)

So, i would replace these as:
drivers/cpufreq/acpi-cpufreq.c:        if (bios_with_sw_any_bug &&
cpumask_weight(policy->cpus) == 1) {
AS
drivers/cpufreq/acpi-cpufreq.c:        if (bios_with_sw_any_bug &&
!policy_is_shared(policy)) {

similarly for the other one too. The whole point is about checking if policy
is managing just one cpu or multiple cpus.
--
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