Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1682057

Re: [PATCH v2 2/6] cpufreq: schedutil: reset sg_cpus's flags at IDLE enter

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Viresh Kumar <viresh.kumar@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 2/6] cpufreq: schedutil: reset sg_cpus's flags at IDLE enter
Date Thu, 06 Jul 2017 07:50:01 +0200
Message-ID <u07PP-eU-5@gated-at.bofh.it> (permalink)
References <tZzXQ-2ZJ-7@gated-at.bofh.it> <tZzXQ-2ZJ-25@gated-at.bofh.it> <tZKzT-1us-3@gated-at.bofh.it> <tZSe5-6Cw-19@gated-at.bofh.it>
X-Original-To Patrick Bellasi <patrick.bellasi@arm.com>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=65rflWJvfIkzPaa8Txby7LfLCmanTyBs1DP2ViEiadE=; b=AWH0cd+WP/ZYjJmnt7PzIzFkwysIlIOoQW1ctu8zGuId6Tza6IeEmKesLt3TCL5Xr+ QUaLv/xUENDYzym3+bFCjre4sncKDLaw18MGTGByXX9X9MFNy3BSr300AgCRZCdqGN7W b1etYyEPinOUCko3MWZvA0o9Sh8e8jnQ1PWGw=
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=65rflWJvfIkzPaa8Txby7LfLCmanTyBs1DP2ViEiadE=; b=p750K4ydzMVZJTZlquonCFkSDs7OkWCUOoaa/GR7Vh8YkyuumQsDxYHqwriYQPGMj5 ukDQfOx0qxoLXnKHRdBuG2Ff+6wppV5ULUJH24/0qRPDhzECd9A/FZySJIcxEDylKZof eU3m8Jdz4bpyuldmG+ZMHKR+0Cs3yLIkqxYIArF8Z39ykxUDQrLfNNpEJAHWWyRD70Is PuZYLaxzoXA+aqqYQGcj+Ewkj77opi2pgZLsGOT6yKH45DyV5Ok80Y6ZdLqGQOX0RwmD twV4BmYi/k3dKCWUdSXexmUr7tr50tfFebonBBcx/TEllOoFvJmsA1Igbt2D+Qa4Z1Ee iX1A==
X-Gm-Message-State AIVw110u3/ZgAz7wOPM7xT+1BDPQgI6fAXfMGlTNgKUjy+DGlbieA0Cs iwUO9157uBX2vmJOzMG1DQ==
X-Received by 10.98.157.13 with SMTP id i13mr24646698pfd.154.1499320018639; Wed, 05 Jul 2017 22:46:58 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.24 (2015-08-30)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 59
Organization linux.* mail to news gateway
X-Original-Cc linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Ingo Molnar <mingo@redhat.com>, Peter Zijlstra <peterz@infradead.org>, "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>, Vincent Guittot <vincent.guittot@linaro.org>, Juri Lelli <juri.lelli@arm.com>, Joel Fernandes <joelaf@google.com>, Andres Oportus <andresoportus@google.com>, Todd Kjos <tkjos@android.com>, Morten Rasmussen <morten.rasmussen@arm.com>, Dietmar Eggemann <dietmar.eggemann@arm.com>
X-Original-Date Thu, 6 Jul 2017 11:16:54 +0530
X-Original-Message-ID <20170706054654.GQ3532@vireshk-i7>
X-Original-References <1499189651-18797-1-git-send-email-patrick.bellasi@arm.com> <1499189651-18797-3-git-send-email-patrick.bellasi@arm.com> <20170705045012.GM3532@vireshk-i7> <20170705130446.GC2659@e110439-lin>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1682057

Show key headers only | View raw


On 05-07-17, 14:04, Patrick Bellasi wrote:
> On 05-Jul 10:20, Viresh Kumar wrote:
> > And also why is it important to write 0 to sg_cpu->flags ? What wouldn't work if
> > we set sg_cpu->flags to SCHED_CPUFREQ_IDLE in this case ? i.e. Just the below
> > statement should be good for us.
> 
> Let say flags have the RT/DL flag set when the RT task sleep, is there
> any specific reason to keep this flag up while the CPU is IDLE?
> IOW, why should we care about an information related to an even which
> is now over?

Maybe I wasn't able to communicate what I wanted to say, but I am not asking you
to keep RT/DL flags as is, but rather set the flags variable to
SCHED_CPUFREQ_IDLE (1 << 3). My concerns were about adding an additional
conditional statement here, while we can live without one.

> The proposal of this patch is just meant to make sure that the flags,
> being a state variable, always describe the current status of the
> sugov "state machine".
> If a CPU is IDLE there are not sensible events going on and thus flags
> should better be reset.

or set to SCHED_CPUFREQ_IDLE.

> > This looks correct.
> > 
> > Can we completely avoid the utilization contribution of the CPUs which have gone
> > idle? Right now we avoid them with help of (delta_ns > TICK_NSEC). Can we
> > instead check this SCHED_CPUFREQ_IDLE flag ?
> 
> I would say that the blocked utilization of an IDLE CPU is still worth
> to be considered, at least for a limited amount of time, for few main
> reasons:
> 
> 1. it represents CPU bandwidth that is likely to be required by a task
>    which can wakeup in a short while. Consider for example an 80% task
>    activated every 16ms: even if it's not running right now it's
>    likely to wakeup in the next ~3ms to run for the following ~13ms.
>    Thus, we should probably better consider that CPU utilization.
> 
> 2. we already have policies to gratefully reduce the current OPP if
>    its utilization decrease. This means that we are interested in a
>    sort of policy which favors higher OPPs to avoid impacting
>    performance of tasks which suddenly wakeup.
>  
> 3. A CPU entering IDLE is not a great source of new information
>    for OPP selection, I would not strictly bind an OPP change to this
>    event. That's also why this patch propose to clear the flags
>    without actually triggering an OPP change.
> 
> Moreover, maybe the issue you are trying to solve it's more related to
> having a stale utilization for an IDLE CPUs?

I wasn't trying to solve any issue here, but just discussing about what should
we do here. Yeah it seems fair to keep the utilization of the idle CPU for
another TICK, after which we are ignoring it anyway.

-- 
viresh

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/6] cpufreq: schedutil: fixes for flags updates Patrick Bellasi <patrick.bellasi@arm.com> - 2017-07-04 19:40 +0200
  [PATCH v2 2/6] cpufreq: schedutil: reset sg_cpus's flags at IDLE enter Patrick Bellasi <patrick.bellasi@arm.com> - 2017-07-04 19:40 +0200
    Re: [PATCH v2 2/6] cpufreq: schedutil: reset sg_cpus's flags at IDLE  enter Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-05 07:00 +0200
      Re: [PATCH v2 2/6] cpufreq: schedutil: reset sg_cpus's flags at IDLE  enter Patrick Bellasi <patrick.bellasi@arm.com> - 2017-07-05 15:10 +0200
        Re: [PATCH v2 2/6] cpufreq: schedutil: reset sg_cpus's flags at IDLE  enter Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-06 07:50 +0200
    Re: [PATCH v2 2/6] cpufreq: schedutil: reset sg_cpus's flags at IDLE enter Joel Fernandes <joelaf@google.com> - 2017-07-07 06:50 +0200
      Re: [PATCH v2 2/6] cpufreq: schedutil: reset sg_cpus's flags at IDLE  enter Juri Lelli <juri.lelli@arm.com> - 2017-07-07 12:20 +0200
        Re: [PATCH v2 2/6] cpufreq: schedutil: reset sg_cpus's flags at IDLE  enter Saravana Kannan <skannan@codeaurora.org> - 2017-07-11 21:20 +0200
  [PATCH v2 5/6] sched/rt: fast switch to maximum frequency when RT tasks are scheduled Patrick Bellasi <patrick.bellasi@arm.com> - 2017-07-04 19:40 +0200
  [PATCH v2 6/6] cpufreq: schedutil: relax rate-limiting while running RT/DL tasks Patrick Bellasi <patrick.bellasi@arm.com> - 2017-07-04 19:40 +0200
  Re: [PATCH v2 0/6] cpufreq: schedutil: fixes for flags updates "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-07-07 00:40 +0200

csiph-web