Re: [PATCH v3 1/3] cpufreq: ondemand: Change the calculation oftarget frequency

From: Borislav Petkov
Date: Thu Jun 06 2013 - 06:02:01 EST


On Wed, Jun 05, 2013 at 10:35:05PM +0200, Rafael J. Wysocki wrote:
> On Wednesday, June 05, 2013 08:13:26 PM Stratos Karafotis wrote:
> > Hi Borislav,
> >
> > On 06/05/2013 07:17 PM, Borislav Petkov wrote:
> > > On Wed, Jun 05, 2013 at 07:01:25PM +0300, Stratos Karafotis wrote:
> > >> Ondemand calculates load in terms of frequency and increases it only
> > >> if the load_freq is greater than up_threshold multiplied by current
> > >> or average frequency. This seems to produce oscillations of frequency
> > >> between min and max because, for example, a relatively small load can
> > >> easily saturate minimum frequency and lead the CPU to max. Then, the
> > >> CPU will decrease back to min due to a small load_freq.
> > >
> > > Right, and I think this is how we want it, no?
> > >
> > > The thing is, the faster you finish your work, the faster you can become
> > > idle and save power.
> >
> > This is exactly the goal of this patch. To use more efficiently middle
> > frequencies to finish faster the work.

Hold on, you say above "easily saturate minimum frequency and lead the
CPU to max". I read this as we jump straight to max P-state where we
even boost.

"CPU to max" finishes the work faster than middle frequencies, if you're
CPU-bound.

> > > If you switch frequencies in a staircase-like manner, you're going to
> > > take longer to finish, in certain cases, and burn more power while doing
> > > so.
> >
> > This is not true with this patch. It switches to middle frequencies
> > when the load < up_threshold.

This is worth investigating wrt hightened power consumption, as Rafael
suggested.

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/