lkml.org 
[lkml]   [2012]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3] cpufreq: ondemand: handle SW coordinated CPUs
Date
On Thursday, November 22, 2012 06:02:37 PM Fabio Baltieri wrote:
> Hello Rafael,
>
> thanks for the review! I only have one concern before sending a v4:
>
> On Thu, Nov 22, 2012 at 01:10:15AM +0100, Rafael J. Wysocki wrote:
> > > @@ -627,32 +659,41 @@ static void do_dbs_timer(struct work_struct *work)
> > > delay -= jiffies % delay;
> > > }
> > > } else {
> > > - __cpufreq_driver_target(dbs_info->cur_policy,
> > > - dbs_info->freq_lo, CPUFREQ_RELATION_H);
> > > + if (sample)
> > > + __cpufreq_driver_target(dbs_info->cur_policy,
> > > + dbs_info->freq_lo,
> > > + CPUFREQ_RELATION_H);
> > > delay = dbs_info->freq_lo_jiffies;
> > > }
> > > - schedule_delayed_work_on(cpu, &dbs_info->work, delay);
> > > + schedule_delayed_work_on(smp_processor_id(), dw, delay);
> >
> > We're not supposed to be using smp_processor_id() any more.
> > get_cpu()/put_cpu() should be used instead.
>
> That's going to add preemption protection, do I need that? The function
> is called from a kworker with the affinity set on a specific CPU, so it
> should not migrate to a different one during execution.

Yes, you're right, in that case it should be OK.

> I agree with you for all the other comments.

Cool. :-)

Thanks,
Rafael


--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.


\
 
 \ /
  Last update: 2012-11-24 00:01    [W:0.046 / U:0.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site