Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751152AbdFTRma (ORCPT ); Tue, 20 Jun 2017 13:42:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42684 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750993AbdFTRm3 (ORCPT ); Tue, 20 Jun 2017 13:42:29 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C2C567CE1C Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=riel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com C2C567CE1C Message-ID: <1497980547.20270.106.camel@redhat.com> Subject: Re: [PATCH 3/3] sched: Spare idle load balancing on nohz_full CPUs From: Rik van Riel To: Frederic Weisbecker , Peter Zijlstra Cc: LKML , Thomas Gleixner , Ingo Molnar Date: Tue, 20 Jun 2017 13:42:27 -0400 In-Reply-To: <1497838322-10913-4-git-send-email-fweisbec@gmail.com> References: <1497838322-10913-1-git-send-email-fweisbec@gmail.com> <1497838322-10913-4-git-send-email-fweisbec@gmail.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-CV1YWDAL8WsUUV6Hz+Nv" Mime-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 20 Jun 2017 17:42:28 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2480 Lines: 74 --=-CV1YWDAL8WsUUV6Hz+Nv Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2017-06-19 at 04:12 +0200, Frederic Weisbecker wrote: > Although idle load balancing obviously only concern 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 in a nohz_full CPU. >=20 > 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. >=20 > Signed-off-by: Frederic Weisbecker > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Rik van Riel > Cc: Peter Zijlstra > --- > =C2=A0kernel/sched/fair.c | 4 ++++ > =C2=A01 file changed, 4 insertions(+) >=20 > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index d711093..cfca960 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -8659,6 +8659,10 @@ void nohz_balance_enter_idle(int cpu) > =C2=A0 if (!cpu_active(cpu)) > =C2=A0 return; > =C2=A0 > + /* Spare idle load balancing on CPUs that don't want to be > disturbed */ > + if (!is_housekeeping_cpu(cpu)) > + return; > + > =C2=A0 if (test_bit(NOHZ_TICK_STOPPED, nohz_flags(cpu))) > =C2=A0 return; I am not entirely convinced on this one. Doesn't the if (on_null_domain(cpu_rq(cpu)) test a few lines down take care of this already? Do we want nohz_full to always automatically imply that no idle balancing will happen, like on isolated CPUs? --=20 All rights reversed --=-CV1YWDAL8WsUUV6Hz+Nv Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJZSV6DAAoJEM553pKExN6DG0cH/1a3htm1tytC//Mc6rm063/r 0iki5rX0MCfHK/0XpDGXy/M84GOXuMEJkUHR0yHd7xyPPJvO+HOHw+8iAP3pWGsH A9wBLk+xBsFoFJW0/R0JVu9zsIi09yNhe68+J9XBBvC2NTPNPjBwQ4S25AiqFz2C NgBRcjwoPiCADtanReVxteZd7m5M8RUY9HUnwaBZQV67R33Tmx3yxt0veFyqj7NP yAaKQsS2VcRSxSegxhMbzQ0/S97zeJe+iS337l0JqkLT1Zd24p7POjpycE4xGN2w ks7ezLBG4huWevLqrvKFo2d5pu0acfTMDoqA1U2+1VDs4ozlMuXMBpQ4OG6oKmc= =K285 -----END PGP SIGNATURE----- --=-CV1YWDAL8WsUUV6Hz+Nv--