linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: preetium@andrew.cmu.edu
Cc: Peter Zijlstra <peterz@infradead.org>,
	Vatika Harlalka <vatikaharlalka@gmail.com>,
	mingo@redhat.com, tglx@linutronix.de, rafael.j.wysocki@intel.com,
	schwidefsky@de.ibm.com, linux-kernel@vger.kernel.org,
	preeti.murthy@gmail.com
Subject: Re: [PATCH 0/2] nohz_full: Offload task_tick to remote housekeeping cpus for nohz_full cpus
Date: Fri, 21 Aug 2015 17:55:36 +0200	[thread overview]
Message-ID: <20150821155535.GA4739@lerouge> (raw)
In-Reply-To: <8d30cc8ff09828555d603e33d58ae0af.squirrel@webmail.andrew.cmu.edu>

On Thu, Aug 20, 2015 at 08:50:55AM -0400, preetium@andrew.cmu.edu wrote:
> > On Thu, Aug 13, 2015 at 05:05:45PM +0200, Peter Zijlstra wrote:
> >> I see nothing like the stuff I asked for in here, on top it creates the
> >> stupid tick.c file.
> >
> > Right. I initially thought that we should make sched_tick() just work with
> > long delays.
> > Then tglx suggested the offline idea but I lost track about our
> > conversation.
> >
> > But yeah making that scheduler_tick() working with long delays sound much
> > better. Certainly
> > much more work but that's a natural evolution after all. It should pay in
> > longer term.
> >
> > We can start with update_cpu_load_active() which only works with HZ
> > frequency updates or
> > nohz idle zero load decay. Now I think that stuff is only used for load
> > balancing. I had
> > hopes this thing could be removed. I think Alex Shin (IIRC) tried but the
> > patchset didn't
> > make it.
> 
> I don't think Peter is talking about delays in updating the scheduler stats.
> Looking at the earlier discussion, it looks like we need to do periodic tick
> tasks only on demand on the nohz_full cpus. We will perhaps need to do the
> following(reiterating some points that Peter said earlier) :
> 
> 1. One of the tasks that scheduler_tick() does is trigger_load_balance(). If
> we have to get rid of the residual tick, we need to move load balancing on
> nohz_full cpus into nohz_idle_balance(). In addition to load balancing on
> the idle cpus, this routine will load balance on the nohz_full cpus as well,
> when they are running single tasks.
> 
> This seems to be a good move because it will avoid pulling more tasks on
> to the nohz_full cpus, when they are running single tasks, unless needed.

I suspect trigger_load_balance() is fine because now nohz full CPUs are part
of cpu_isolated_map. I believe in that case they are on_null_domains(). If not
then we should have a similar ignore check.

> 
> 2. In nohz_idle_load_balance(), there needs to be routines similar to
> update_idle_cpu_load() for nohz_full cpus so that the cpu loads are updated
> before triggering load balance on them. Lets call this
> update_nohz_full_cpu_load().
> This should include update_curr() and update_cpu_load_active() for nohz_full
> cpus.

nohz_idle_load_balance() shouldn't happen if trigger_load_balance() is ignored.

> 
> 3. When scheduling stats are read, update_curr() and
> update_cpu_load_active() will
> be called remotely.

Concerning update_cpu_load_active(), I wonder if rq->cpu_load[i > 0] are read
for CPUs from cpu_isolated_map. I suspect that an isolated CPU shouldn't belong
to any struct sched_group.

Now we can force disable SCHED_LB_BIAS otherwise.

Concerning update_curr(), we have yet to find all the places that do remote
read. But again, perhaps an isolated cpu isn't subject to sched stats
(involved in upodate_curr()) remotely read.

That's all stuff we need to verify.

  reply	other threads:[~2015-08-21 15:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-13  9:25 [PATCH 0/2] nohz_full: Offload task_tick to remote housekeeping cpus for nohz_full cpus Vatika Harlalka
2015-08-13  9:25 ` [PATCH 1/2] nohz_full: Move tick related code to tick.c Vatika Harlalka
2015-08-13 12:22 ` [PATCH 0/2] nohz_full: Offload task_tick to remote housekeeping cpus for nohz_full cpus Peter Zijlstra
2015-08-13 12:44   ` Frederic Weisbecker
2015-08-13 15:05     ` Peter Zijlstra
2015-08-13 15:36       ` Frederic Weisbecker
2015-08-13 19:22         ` Vatika Harlalka
2015-08-20 12:50         ` preetium
2015-08-21 15:55           ` Frederic Weisbecker [this message]
     [not found]             ` <CACFGFQQ8mBzS-NhfNsp2nao2XpUksxu3t_Jse2zL2EQHLAK_Hg@mail.gmail.com>
2015-09-11 17:05               ` Vatika Harlalka

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=20150821155535.GA4739@lerouge \
    --to=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=preeti.murthy@gmail.com \
    --cc=preetium@andrew.cmu.edu \
    --cc=rafael.j.wysocki@intel.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=vatikaharlalka@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).