Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2570339imm; Mon, 10 Sep 2018 03:17:25 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb8iFK0COD2E9j85d65O51nPNVa++ytdSbFGeeoocS4PqTiXmO14dbwQd1U/HGriag5BhRE X-Received: by 2002:a62:868b:: with SMTP id x133-v6mr23023163pfd.252.1536574645716; Mon, 10 Sep 2018 03:17:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536574645; cv=none; d=google.com; s=arc-20160816; b=uECrVUmKrnkULTSgXU1gQR13wZkD0Wgg5QtpIBKkGTmvDbLDalfwD4QEfhTVQEAygd vlIcpghf2RGULacBJleTWtjJqCzcgD430b3a0AKE+grPkc55U85/EG7uaX9rfDgU7UR7 eMC0WchZ5Yr2/X05niOA1S7y/CQfhuEA5A4CBAV+0EP4NPxDhvatsbJf0ORCuO1XmAxu V+3XZNv1U5QkQ44ow/DZfskbMKXLeQZArphCt2zDxnyTkBlXppXXgGEWG+1jzszQZV6k 0g+OAqKaHXfQIo5DiLASElx67SQ4UPE8ffW6XMbPipCSKqvwAN6DCVF2B9RlQeQgWUnl iM+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=tvUrT+/jykSYsh/9K8/X/eItDgwXi76gbiISeJA8vdU=; b=hMV1nrfeedQPpKhlfrRWN6SuKIM3yi/1S/Mt9dkhgti9F8VJJHLHcqKxAkOKSIwXps WinDIK7njd1IiZqRkgTJI/b/oHmMsP+amYOJhp7jnrG6GxAmlZt+Hqzyi1AkgVVof189 b0T3dle6UQkV/zOWkRFe7fZ/tTrHjWNAPRIZAVUWEjydMWcmvdcyTr/bsRGpPidTl9qL xCZhY0aXGXAGroo6HedmjtghcGV/H1oRpak8NLyxRJPH1W3+MOyYQ7rs+DBNCVsoBAdj BzMS1ZTjyJZyEKwmfi41KpOpgAUFCi6ph80FpUWIv27MILMKH6dh2/LUIdFq8aAXMCTY w6Eg== 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 j24-v6si16441790pfn.363.2018.09.10.03.17.10; Mon, 10 Sep 2018 03:17:25 -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 S1728308AbeIJPJJ (ORCPT + 99 others); Mon, 10 Sep 2018 11:09:09 -0400 Received: from terminus.zytor.com ([198.137.202.136]:57755 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727796AbeIJPJJ (ORCPT ); Mon, 10 Sep 2018 11:09:09 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w8AAFR5d1808144 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 10 Sep 2018 03:15:27 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w8AAFRHb1808141; Mon, 10 Sep 2018 03:15:27 -0700 Date: Mon, 10 Sep 2018 03:15:27 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Valentin Schneider Message-ID: Cc: linux-kernel@vger.kernel.org, valentin.schneider@arm.com, torvalds@linux-foundation.org, peterz@infradead.org, hpa@zytor.com, mingo@kernel.org, morten.rasmussen@arm.com, tglx@linutronix.de Reply-To: mingo@kernel.org, morten.rasmussen@arm.com, tglx@linutronix.de, hpa@zytor.com, peterz@infradead.org, torvalds@linux-foundation.org, valentin.schneider@arm.com, linux-kernel@vger.kernel.org In-Reply-To: <1530699470-29808-6-git-send-email-morten.rasmussen@arm.com> References: <1530699470-29808-6-git-send-email-morten.rasmussen@arm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/core] sched/fair: Kick nohz balance if rq->misfit_task_load Git-Commit-ID: 5fbdfae5221a5208ed8e7653fc1c4b31de420f74 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 5fbdfae5221a5208ed8e7653fc1c4b31de420f74 Gitweb: https://git.kernel.org/tip/5fbdfae5221a5208ed8e7653fc1c4b31de420f74 Author: Valentin Schneider AuthorDate: Wed, 4 Jul 2018 11:17:43 +0100 Committer: Ingo Molnar CommitDate: Mon, 10 Sep 2018 11:05:51 +0200 sched/fair: Kick nohz balance if rq->misfit_task_load 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_load 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: https://lists.linaro.org/pipermail/eas-dev/2016-September/000551.html Signed-off-by: Valentin Schneider Signed-off-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: gaku.inami.xh@renesas.com Cc: vincent.guittot@linaro.org Link: http://lkml.kernel.org/r/1530699470-29808-6-git-send-email-morten.rasmussen@arm.com Signed-off-by: Ingo Molnar --- 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 24fe39e57bc3..e08287d3806f 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9135,7 +9135,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; }