lkml.org 
[lkml]   [2018]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC/RFT] [PATCH v2 4/6] cpufreq: intel_pstate: HWP boost performance on IO wakeup
Date
On Tue, 2018-05-29 at 09:44 +0200, Rafael J. Wysocki wrote:
> On Thu, May 24, 2018 at 3:47 AM, Srinivas Pandruvada
> <srinivas.pandruvada@linux.intel.com> wrote:

[...]

> >
> > +       cpu->sample.time = time;
> > +       io_flag = test_and_clear_bit(SCHED_CPUFREQ_IOWAIT, &cpu-
> > >sched_flags);
>
> I don't think you need to use bit ops here.

Agree. This is not required here for just IO boost support.

>
> _update_util() runs under rq->lock for the target CPU, so it will not
> run concurrently on two different CPUs for the same target anyway.
>
> > +       if (io_flag) {
> > +               bool do_io = false;
> > +
> > +               /*
> > +                * Set iowait_boost flag and update time. Since IO
> > WAIT flag
> > +                * is set all the time, we can't just conclude that
> > there is
> > +                * some IO bound activity is scheduled on this CPU
> > with just
> > +                * one occurrence. If we receive at least two in
> > two
> > +                * consecutive ticks, then we treat as boost
> > candidate.
> > +                */
> > +               if (time_before64(time, cpu->last_io_update + 2 *
> > TICK_NSEC))
> > +                       do_io = true;
> > +
> > +               cpu->last_io_update = time;
> > +
> > +               if (do_io)
> > +                       intel_pstate_hwp_boost_up(cpu);
>
> But what happens if user space wants to update the limits while
> boosting is in effect?  Shouldn't it take hwp_boost_min into account
> then?
User request has always higher priority. User min will be taken into
account as the boost min is updated under the the update util call
back, not just one time.

Thanks,
Srinivas
[unhandled content-type:application/x-pkcs7-signature]
\
 
 \ /
  Last update: 2018-05-30 00:24    [W:0.048 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site