All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Lists linaro-kernel <linaro-kernel@lists.linaro.org>
Subject: Re: [Query]: tick-sched: why don't we stop tick when we are running idle task?
Date: Thu, 22 May 2014 10:44:19 +0200	[thread overview]
Message-ID: <20140522084419.GS30445@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20140513233036.GH13828@localhost.localdomain>

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

On Wed, May 14, 2014 at 01:30:39AM +0200, Frederic Weisbecker wrote:
> On Fri, May 09, 2014 at 02:14:10PM +0530, Viresh Kumar wrote:
> > On 23 April 2014 16:42, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > > On 15 April 2014 15:00, Frederic Weisbecker <fweisbec@gmail.com> wrote:
> > >> Ok, I'm a bit buzy with a conference right now but I'm going to summarize that
> > >> soonish.
> > 
> > Hi Frederic,
> > 
> > Please see if you can find some time to close this, that would be very
> > helpful :)
> > 
> > Thanks
> 
> I'm generally worried about the accounting in update_curr() that periodically
> updates stats. I have no idea which of these stats could be read by other CPUs:
> vruntime, load bandwitdth, etc...

update_curr() principally does the sum_exec_runtime and vruntime. Now
vruntime is only interesting for other cpus when moving tasks across
CPUs, so see below on load-balancing.

sum_exec_runtime is used for a number of task stats, but when nobody
looks at those it shouldn't matter.

So rather than constantly force update them for no purpose, update them
on-demand. So when someone reads those cputime stats, prod the task/cpu.
I think you can do a remote update_curr() just fine.

And I suppose you also need to do something with task_tick_numa(), that
relies on the tick regardless of nr_running. And that's very much not
something you can do remotely. As it stands I think the numa balancing
and nohz_full are incompatible.

> Also without tick:
> 
> * we don't poll anymore on trigger_load_balance()
> 
> * __update_cpu_load() requires fixed rate periodic polling. Alex Shi had
> patches for that but I'm not sure if that's going to be merged
> 
> * rq->rt_avg accounting?

So I think typically we don't want load-balancing to happen when we're
on a nohz_full cpu and there's only the one task running.

So what you can do is extend the existing nohz balancing (which
currently only deals with CPU_IDLE) to also remote balance CPU_NOT_IDLE
when nr_running == 1.


[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2014-05-22  8:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-09 10:33 [Query]: tick-sched: why don't we stop tick when we are running idle task? Viresh Kumar
2014-04-09 10:49 ` Viresh Kumar
2014-04-10 14:39   ` Frederic Weisbecker
2014-04-11 10:04     ` Viresh Kumar
2014-04-11 14:53       ` Frederic Weisbecker
2014-04-11 15:18         ` Peter Zijlstra
2014-04-11 16:38           ` Viresh Kumar
2014-04-14  9:48             ` Preeti Murthy
2014-04-14  9:51               ` Viresh Kumar
2014-04-14 11:02             ` Peter Zijlstra
2014-04-14 11:42               ` Viresh Kumar
2014-04-14 11:47                 ` Peter Zijlstra
2014-04-14 11:52                   ` Viresh Kumar
2014-04-14 12:06                     ` Peter Zijlstra
2014-04-15  6:04                       ` Viresh Kumar
2014-04-15  9:30                       ` Frederic Weisbecker
2014-04-15 10:52                         ` Peter Zijlstra
2014-04-15 10:53                           ` Peter Zijlstra
2014-04-23 11:12                         ` Viresh Kumar
2014-05-09  8:44                           ` Viresh Kumar
2014-05-13 23:30                             ` Frederic Weisbecker
2014-05-22  8:44                               ` Peter Zijlstra [this message]

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=20140522084419.GS30445@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=fweisbec@gmail.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --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.