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


Groups > linux.kernel > #1672541 > unrolled thread

[tip:sched/core] sched/fair: Spare idle load balancing on nohz_full CPUs

Started bytip-bot for Frederic Weisbecker <tipbot@zytor.com>
First post2017-06-22 13:20 +0200
Last post2017-06-22 21:50 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [tip:sched/core] sched/fair: Spare idle load balancing on nohz_full  CPUs tip-bot for Frederic Weisbecker <tipbot@zytor.com> - 2017-06-22 13:20 +0200
    Re: [tip:sched/core] sched/fair: Spare idle load balancing on  nohz_full CPUs Frederic Weisbecker <fweisbec@gmail.com> - 2017-06-22 16:00 +0200
      Re: [tip:sched/core] sched/fair: Spare idle load balancing on  nohz_full CPUs Ingo Molnar <mingo@kernel.org> - 2017-06-22 21:50 +0200

#1672541 — [tip:sched/core] sched/fair: Spare idle load balancing on nohz_full CPUs

Fromtip-bot for Frederic Weisbecker <tipbot@zytor.com>
Date2017-06-22 13:20 +0200
Subject[tip:sched/core] sched/fair: Spare idle load balancing on nohz_full CPUs
Message-ID<tV8jv-3Vn-5@gated-at.bofh.it>
Commit-ID:  387bc8b5536eeb0a92f4b4ab553539eaea2ac0ba
Gitweb:     http://git.kernel.org/tip/387bc8b5536eeb0a92f4b4ab553539eaea2ac0ba
Author:     Frederic Weisbecker <fweisbec@gmail.com>
AuthorDate: Mon, 19 Jun 2017 04:12:02 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 22 Jun 2017 11:30:02 +0200

sched/fair: Spare idle load balancing on nohz_full CPUs

Although idle load balancing obviously only concerns idle CPUs, it can
be a disturbance on a busy nohz_full CPU. Indeed a CPU can only get rid
of an idle load balancing duty once a tick fires while it runs a task
and this can take a while on a nohz_full CPU.

We could fix that and escape the idle load balancing duty from the very
idle exit path but that would bring unecessary overhead. Lets just not
bother and leave that job to housekeeping CPUs (those outside nohz_full
range). The nohz_full CPUs simply don't want any disturbance.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1497838322-10913-4-git-send-email-fweisbec@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/sched/fair.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index a24661a..694c258 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -8683,6 +8683,10 @@ void nohz_balance_enter_idle(int cpu)
 	if (!cpu_active(cpu))
 		return;
 
+	/* Spare idle load balancing on CPUs that don't want to be disturbed: */
+	if (!is_housekeeping_cpu(cpu))
+		return;
+
 	if (test_bit(NOHZ_TICK_STOPPED, nohz_flags(cpu)))
 		return;
 

[toc] | [next] | [standalone]


#1672653 — Re: [tip:sched/core] sched/fair: Spare idle load balancing on nohz_full CPUs

FromFrederic Weisbecker <fweisbec@gmail.com>
Date2017-06-22 16:00 +0200
SubjectRe: [tip:sched/core] sched/fair: Spare idle load balancing on nohz_full CPUs
Message-ID<tVaOm-5tA-13@gated-at.bofh.it>
In reply to#1672541
Hi Ingo,

On Thu, Jun 22, 2017 at 04:11:53AM -0700, tip-bot for Frederic Weisbecker wrote:
> Commit-ID:  387bc8b5536eeb0a92f4b4ab553539eaea2ac0ba
> Gitweb:     http://git.kernel.org/tip/387bc8b5536eeb0a92f4b4ab553539eaea2ac0ba
> Author:     Frederic Weisbecker <fweisbec@gmail.com>
> AuthorDate: Mon, 19 Jun 2017 04:12:02 +0200
> Committer:  Ingo Molnar <mingo@kernel.org>
> CommitDate: Thu, 22 Jun 2017 11:30:02 +0200
> 
> sched/fair: Spare idle load balancing on nohz_full CPUs

Thanks for applying the series! The two other patches are indeed good but
Rik and Mike have mitigated feelings about this very patch. I think we need to decouple
housekeeping from nohz_full before applying it. Is it possible to set it aside
for now?

Thanks!

[toc] | [prev] | [next] | [standalone]


#1673009 — Re: [tip:sched/core] sched/fair: Spare idle load balancing on nohz_full CPUs

FromIngo Molnar <mingo@kernel.org>
Date2017-06-22 21:50 +0200
SubjectRe: [tip:sched/core] sched/fair: Spare idle load balancing on nohz_full CPUs
Message-ID<tVgh4-Ba-7@gated-at.bofh.it>
In reply to#1672653
* Frederic Weisbecker <fweisbec@gmail.com> wrote:

> Hi Ingo,
> 
> On Thu, Jun 22, 2017 at 04:11:53AM -0700, tip-bot for Frederic Weisbecker wrote:
> > Commit-ID:  387bc8b5536eeb0a92f4b4ab553539eaea2ac0ba
> > Gitweb:     http://git.kernel.org/tip/387bc8b5536eeb0a92f4b4ab553539eaea2ac0ba
> > Author:     Frederic Weisbecker <fweisbec@gmail.com>
> > AuthorDate: Mon, 19 Jun 2017 04:12:02 +0200
> > Committer:  Ingo Molnar <mingo@kernel.org>
> > CommitDate: Thu, 22 Jun 2017 11:30:02 +0200
> > 
> > sched/fair: Spare idle load balancing on nohz_full CPUs
> 
> Thanks for applying the series! The two other patches are indeed good but
> Rik and Mike have mitigated feelings about this very patch. I think we need to decouple
> housekeeping from nohz_full before applying it. Is it possible to set it aside
> for now?

Well, if patches are forthcoming and the commit isn't buggy per se, we could have 
it with the note of it being improved further.

Thanks,

	Ingo

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web