Re: [PATCH v6 1/8] cpufreq: Store cpufreq policies in a list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 26 Jul 2013 16:32:34 +0530 Viresh Kumar viresh.kumar@xxxxxxxxxx
wrote,
> On 26 July 2013 16:28, Lukasz Majewski <l.majewski@xxxxxxxxxxx> wrote:
> > On Fri, 26 Jul 2013 15:44:29 +0530 Viresh Kumar
> > viresh.kumar@xxxxxxxxxx wrote,
> >> On 25 July 2013 22:03, Lukasz Majewski <l.majewski@xxxxxxxxxxx>
> >> wrote:
> 
> >> Looks good but would have been better if you could have moved
> >> existing code to use this infrastructure..
> >>
> >> For example, this code in __cpufreq_add_dev()
> >>
> >> #ifdef CONFIG_HOTPLUG_CPU
> >>       /* Check if this cpu was hot-unplugged earlier and has
> >> siblings */ read_lock_irqsave(&cpufreq_driver_lock, flags);
> >>       for_each_online_cpu(sibling) {
> >>
> >>          ---
> >>
> >>       }
> >>       read_unlock_irqrestore(&cpufreq_driver_lock, flags);
> >> #endif
> >
> > Do you mean to write something like:
> >
> > #ifdef CONFIG_CPU_FREQ_BOOST_SW
> >         write_lock_irqsave(&cpufreq_driver_lock, flags);
> >         list_add(&policy->policy_list, &cpufreq_policy_list);
> >         write_unlock_irqrestore(&cpufreq_driver_lock, flags);
> > #endif
> >
> > Or Am I missing something?
> 
> I can't imaging how you though I am saying this :)
>

:-)
 
> The code I mentioned actually requires to iterate through the
> list of available policies but was iterating over all online cpus..
> 
> And so your new infrastructure or this list can be used instead
> of looping for all cpus.

So instead of reading policies from per_cpu variables for all online
cpus, you think of using the list explicitly.

Good idea, but can we first finish the boost patches? Such change can
be applied on top of boost patch series as well.

-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
--
To unsubscribe from this list: send the line "unsubscribe cpufreq" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Devel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Forum]     [Linux SCSI]

  Powered by Linux