All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pandruvada, Srinivas" <srinivas.pandruvada@intel.com>
To: "rafael@kernel.org" <rafael@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"juri.lelli@redhat.com" <juri.lelli@redhat.com>,
	"rjw@rjwysocki.net" <rjw@rjwysocki.net>,
	"viresh.kumar@linaro.org" <viresh.kumar@linaro.org>,
	"mgorman@techsingularity.net" <mgorman@techsingularity.net>,
	"lenb@kernel.org" <lenb@kernel.org>
Subject: Re: [RFC/RFT] [PATCH v2 4/6] cpufreq: intel_pstate: HWP boost performance on IO wakeup
Date: Tue, 29 May 2018 22:24:25 +0000	[thread overview]
Message-ID: <1527632663.2951.44.camel@intel.com> (raw)
In-Reply-To: <CAJZ5v0iG+jNC77KCHNUAt5tAtrtgryz2U4P1s_d9vB0HzLyOFw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1936 bytes --]

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

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3290 bytes --]

  reply	other threads:[~2018-05-29 22:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-24  1:47 [RFC/RFT] [PATCH v2 0/6] Intel_pstate: HWP Dynamic performance boost Srinivas Pandruvada
2018-05-24  1:47 ` [RFC/RFT] [PATCH v2 1/6] cpufreq: intel_pstate: Cache last HWP capability/request value Srinivas Pandruvada
2018-05-24  1:47 ` [RFC/RFT] [PATCH v2 2/6] cpufreq: intel_pstate: Add HWP boost utility functions Srinivas Pandruvada
2018-05-29  7:47   ` Rafael J. Wysocki
2018-05-24  1:47 ` [RFC/RFT] [PATCH v2 3/6] cpufreq: intel_pstate: Add update_util_hook for HWP Srinivas Pandruvada
2018-05-29  7:37   ` Rafael J. Wysocki
2018-05-29 22:17     ` Srinivas Pandruvada
2018-05-24  1:47 ` [RFC/RFT] [PATCH v2 4/6] cpufreq: intel_pstate: HWP boost performance on IO wakeup Srinivas Pandruvada
2018-05-29  7:44   ` Rafael J. Wysocki
2018-05-29 22:24     ` Pandruvada, Srinivas [this message]
2018-05-24  1:47 ` [RFC/RFT] [PATCH v2 5/6] cpufreq: intel_pstate: New sysfs entry to control HWP boost Srinivas Pandruvada
2018-05-24  1:47 ` [RFC/RFT] [PATCH v2 6/6] cpufreq: intel_pstate: enable boost for SKX Srinivas Pandruvada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1527632663.2951.44.camel@intel.com \
    --to=srinivas.pandruvada@intel.com \
    --cc=juri.lelli@redhat.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mgorman@techsingularity.net \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.