Received: by 10.213.65.68 with SMTP id h4csp15imn; Thu, 15 Mar 2018 07:49:35 -0700 (PDT) X-Google-Smtp-Source: AG47ELtXhhUtq1ItxVfnCwozufD/U67IO4NjEdVUHvb/fJah7iR56luP54RlE/zUEP9pq3WfK9rl X-Received: by 10.99.121.73 with SMTP id u70mr1589764pgc.232.1521125375036; Thu, 15 Mar 2018 07:49:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521125375; cv=none; d=google.com; s=arc-20160816; b=X6pB4LZOVS8fxkZxU3bLAm7lWvOMBiBXIsuRc8WFpsF5q9V55nP8ZgYZ3qGvBB3dGb E4ezy7wb+i9Qn3ijf3R+XeLaAG7MMC2wExI6s60SkmToqR8Y5WBE5xkmUzAhyo985wk4 VY8HsL4fQzZL6wA2l8LY5VTKbXzNU8UdXkPFFvUYMBiOt4S50ZPYODPiCv2IfuPhsdb/ z/+P0OYUrCUfzjUh+HH+doXHjVUUFv9ey7DIC7Gr8EAdXjCwdm6Tgi1PIcYFepb/zZQE 9jr1I0iyAcqw1/n86D2jdJnIvE/O3GifYARnlfzlmsJ9UASrergoHVG46J7TGLpzxKqx h+1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=WakdUCH1BPkLW5H7MbGSnhnLuS+n7Pgkf9ogPX1vwFc=; b=tNlB7NOJ9C3a0vcR0NmgZS9FzxMoW31gTZlrw/QHrAe55oLy1Smc9YZVm9f8rT/Fkk P8qwrfpLdgNdFOKc2HJIeq3GbSz0LqR6XDCqNFJzTtae5hRPdN2BwgUw2xaO+TqC1C9O 537niFPGkfXGOW00U/H+zowo0BCtDV0vd5rJITh6qX7OAR8rtmdthvnXqa82AV/vKfbi WKJJDNsDZBren7PJxULIIn7et+WCo5muwOqizBe0cK5lRSfDu04Rn+G1KNaEzj1E6Wtu JNTk+a0JSqLpKgCZeHBUa5Kt0iA4myS61px40W364B/Wa4bm99COFn0Bs19Kwa32Xcp9 aVmQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bj8-v6si2615859plb.306.2018.03.15.07.49.19; Thu, 15 Mar 2018 07:49:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752667AbeCOOre (ORCPT + 99 others); Thu, 15 Mar 2018 10:47:34 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:40036 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752108AbeCOOrb (ORCPT ); Thu, 15 Mar 2018 10:47:31 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 17E17168F; Thu, 15 Mar 2018 07:47:31 -0700 (PDT) Received: from e105550-lin.cambridge.arm.com (e105550-lin.cambridge.arm.com [10.1.211.30]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 92FC93F487; Thu, 15 Mar 2018 07:47:29 -0700 (PDT) From: Morten Rasmussen To: peterz@infradead.org, mingo@redhat.com Cc: valentin.schneider@arm.com, dietmar.eggemann@arm.com, vincent.guittot@linaro.org, gaku.inami.xh@renesas.com, linux-kernel@vger.kernel.org, Morten Rasmussen Subject: [PATCHv2 4/7] sched/fair: Kick nohz balance if rq->misfit_task Date: Thu, 15 Mar 2018 14:47:01 +0000 Message-Id: <1521125224-15434-5-git-send-email-morten.rasmussen@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521125224-15434-1-git-send-email-morten.rasmussen@arm.com> References: <1521125224-15434-1-git-send-email-morten.rasmussen@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Valentin Schneider There already are a few conditions in nohz_kick_needed() to ensure a nohz kick is triggered, but they are not enough for some misfit task scenarios. Excluding asym packing, those are: * rq->nr_running >=2: Not relevant here because we are running a misfit task, it needs to be migrated regardless and potentially through active balance. * sds->nr_busy_cpus > 1: If there is only the misfit task being run on a group of low capacity cpus, this will be evaluated to False. * rq->cfs.h_nr_running >=1 && check_cpu_capacity(): Not relevant here, misfit task needs to be migrated regardless of rt/IRQ pressure As such, this commit adds an rq->misfit_task condition to trigger a nohz kick. The idea to kick a nohz balance for misfit tasks originally came from Leo Yan , and a similar patch was submitted for the Android Common Kernel - see [1]. [1]: https://lists.linaro.org/pipermail/eas-dev/2016-September/000551.html cc: Ingo Molnar cc: Peter Zijlstra Signed-off-by: Valentin Schneider Signed-off-by: Morten Rasmussen --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 496062860733..c791dd7ac9a8 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9291,7 +9291,7 @@ static void nohz_balancer_kick(struct rq *rq) if (time_before(now, nohz.next_balance)) goto out; - if (rq->nr_running >= 2) { + if (rq->nr_running >= 2 || rq->misfit_task_load) { flags = NOHZ_KICK_MASK; goto out; } -- 2.7.4