mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Morten Rasmussen <morten.rasmussen@arm.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>,
	"mingo@kernel.org" <mingo@kernel.org>,
	"pjt@google.com" <pjt@google.com>, "rjw@sisk.pl" <rjw@sisk.pl>,
	"dirk.j.brandewie@intel.com" <dirk.j.brandewie@intel.com>,
	"vincent.guittot@linaro.org" <vincent.guittot@linaro.org>,
	"alex.shi@linaro.org" <alex.shi@linaro.org>,
	"preeti@linux.vnet.ibm.com" <preeti@linux.vnet.ibm.com>,
	"efault@gmx.de" <efault@gmx.de>,
	"corbet@lwn.net" <corbet@lwn.net>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	Catalin Marinas <Catalin.Marinas@arm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linaro-kernel@lists.linaro.org" <linaro-kernel@lists.linaro.org>
Subject: Re: [RFC][PATCH 4/7] sched: power: Remove power capacity hints for kworker threads
Date: Thu, 17 Oct 2013 18:54:16 +0200	[thread overview]
Message-ID: <20131017165416.GW10651@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20131017164038.GV31039@e103034-lin>

On Thu, Oct 17, 2013 at 05:40:38PM +0100, Morten Rasmussen wrote:
> On Mon, Oct 14, 2013 at 04:14:25PM +0100, Arjan van de Ven wrote:
> > On 10/14/2013 6:33 AM, Peter Zijlstra wrote:
> > > On Fri, Oct 11, 2013 at 06:19:14PM +0100, Morten Rasmussen wrote:
> > >> Removing power hints for kworker threads enables easier use of
> > >> workqueues in the power driver late callback. That would otherwise
> > >> lead to an endless loop unless it is prevented in the power driver.
> > >
> > > There's many kworker users; some of them actually consume lots of
> > > cputime. Therefore how did you come to the conclusion that excepting all
> > > users was the better choice of a little added complexity in the one
> > > place where it actually matters?
> > 
> > .. and likely only for a very few architectures
> > 
> > x86, and I suspect modern ARM, can change frequency synchronously.
> > (using an instruction or maybe two or three for ARM)
> 
> It should be possible to implement synchronous frequency changes on most
> modern ARM platforms. It is a bit more than a few instructions to change
> frequency though particularly for the current cpufreq drivers.
> 
> cpufreq drivers, like the one for ARM TC2, uses the clock framework to
> manage clocks. clk_set_rate() is allowed to sleep which won't work if we
> call it from scheduler context. The clock framework will need a look if
> it doesn't provide a very fast synchronous alternative to clk_set_rate()
> to change frequency and we want to use it for scheduler driven frequency
> scaling.
> 
> cpufreq has pre- and post-change notifiers so the current TC2 clock driver
> waits (yields) in its clk_set_rate() implementation until the change has
> happened to ensure that the post-change notifier happens at the right
> time. Since clk_set_rate() is allowed to sleep other tasks may be
> running while waiting for the change to complete. This may be true for
> other clock drivers as well.
> 
> AFAICT, there is no way to reuse the existing cpufreq drivers in a
> sensible way for scheduler driven frequency scaling. It should be
> possible to have very fast frequency changes on ARM but it is not the
> way it is currently done.


Note that you still have preemption disabled in your late callback from
finish_task_switch(). There's no way you can wait/yield/whatever from
there. Nor is that really sane.

Just say no to the existing cruft ?

  reply	other threads:[~2013-10-17 16:54 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-11 17:19 [RFC][PATCH 0/7] Power-aware scheduling v2 Morten Rasmussen
2013-10-11 17:19 ` [RFC][PATCH 1/7] Initial power driver interface infrastructure Morten Rasmussen
2013-10-11 17:19 ` [RFC][PATCH 2/7] sched: power: Power driver late callback interface Morten Rasmussen
2013-10-14 13:42   ` Peter Zijlstra
2013-10-11 17:19 ` [RFC][PATCH 3/7] sched: power: go_faster/slower power driver hints Morten Rasmussen
2013-10-12  2:58   ` Michael wang
2013-10-14 12:42     ` Morten Rasmussen
2013-10-14 13:48   ` Peter Zijlstra
2013-10-14 15:55     ` Morten Rasmussen
2013-10-11 17:19 ` [RFC][PATCH 4/7] sched: power: Remove power capacity hints for kworker threads Morten Rasmussen
2013-10-14 13:33   ` Peter Zijlstra
2013-10-14 15:14     ` Arjan van de Ven
2013-10-17 16:40       ` Morten Rasmussen
2013-10-17 16:54         ` Peter Zijlstra [this message]
2013-10-17 17:18           ` Arjan van de Ven
2013-10-18  8:47             ` Morten Rasmussen
2013-10-18 13:43               ` Arjan van de Ven
2013-10-18  8:38           ` Morten Rasmussen
2013-10-14 16:10     ` Morten Rasmussen
2013-10-14 16:13       ` Arjan van de Ven
2013-10-14 17:19         ` Morten Rasmussen
2013-10-11 17:19 ` [RFC][PATCH 5/7] sched: power: Increase cpu capacity based on rq tracked load Morten Rasmussen
2013-10-11 17:19 ` [RFC][PATCH 6/7] sched: power: cpufreq: Initial schedpower cpufreq governor/power driver Morten Rasmussen
2013-10-11 17:19 ` [RFC][PATCH 7/7] sched: power: Let the power driver choose the best wake-up cpu Morten Rasmussen
2013-10-14 13:32 ` [RFC][PATCH 0/7] Power-aware scheduling v2 Peter Zijlstra
2013-10-14 17:15   ` Morten Rasmussen
2013-10-14 17:31     ` Peter Zijlstra
2013-10-15 17:05       ` Morten Rasmussen
2013-10-15  9:57   ` Preeti U Murthy

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=20131017165416.GW10651@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=Catalin.Marinas@arm.com \
    --cc=alex.shi@linaro.org \
    --cc=arjan@linux.intel.com \
    --cc=corbet@lwn.net \
    --cc=dirk.j.brandewie@intel.com \
    --cc=efault@gmx.de \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=morten.rasmussen@arm.com \
    --cc=pjt@google.com \
    --cc=preeti@linux.vnet.ibm.com \
    --cc=rjw@sisk.pl \
    --cc=tglx@linutronix.de \
    --cc=vincent.guittot@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome