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] [day] [month] [year] [list]
Message-ID: <1527632663.2951.44.camel@intel.com>
Date:   Tue, 29 May 2018 22:24:25 +0000
From:   "Pandruvada, Srinivas" <srinivas.pandruvada@...el.com>
To:     "rafael@...nel.org" <rafael@...nel.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
        "juri.lelli@...hat.com" <juri.lelli@...hat.com>,
        "rjw@...ysocki.net" <rjw@...ysocki.net>,
        "viresh.kumar@...aro.org" <viresh.kumar@...aro.org>,
        "mgorman@...hsingularity.net" <mgorman@...hsingularity.net>,
        "lenb@...nel.org" <lenb@...nel.org>
Subject: Re: [RFC/RFT] [PATCH v2 4/6] cpufreq: intel_pstate: HWP boost
 performance on IO wakeup

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@...ux.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

Download attachment "smime.p7s" of type "application/x-pkcs7-signature" (3290 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ