Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp521527imm; Wed, 20 Jun 2018 02:10:19 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ9QD/oP+qa2zDkvwbaaa9/ItJjEUBk+xr0qY+Xzogfw+E6vd3vl74xtHL27rm4gfMzIS65 X-Received: by 2002:a65:6491:: with SMTP id e17-v6mr17924209pgv.44.1529485819404; Wed, 20 Jun 2018 02:10:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529485819; cv=none; d=google.com; s=arc-20160816; b=Raq1ZdgTinQuDRXPYDn7l5k1Yte/fsNu0t40UcbdjSQhqkjbHcaglZIw4A+BywM5d9 d8f/j4dF5me56F4RO9ferrJ+puYz+SHRgZ+B0czd5uI84hVhS2O70pR5mbsdE3IW6aqx fVrrN+9K1N2iZdId5/rZgC2sOuHC2UDmvi4Mt0vy6e4/VDebCVefdo/VWlmin/ZUdj3G 8x0oefbPVCldZ9vNc47pfiRnGpPPaIFfQVw+ot8znCbe3qQH9g4xE2N0j/+Luu9kTdKB c9F/orRwy+eFBpaQgoBDrO12yPRsmCkTskn0cIDxiN3D41VWNEa4grfneF8fRfMHlfXI zrrA== 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=bmnJnZYgbxuKdfKtt6X51AEkAHjYvNS1l/dYk4fIUIA=; b=Q/7W2LgMr/HLa31IMzK5NjL+ade5MXH7R4hkJXcJI3j7AJXKmJZmAdcnMvEsTBjdyX PQzDb0QoPI6YN0b3jvYgSBwzLvPJ1nJNIlZa4IhNvY07of6z7nSo186xx8LgO4R43c05 fyUfmvlY/tzyFW7o0wrDoI21cXUNMaqjr1Zq54zJvbbCIkmQzeoI49Gjswyv8+4WidCb FXYuiyRkh9KvTXP75xwpXFKViEuRjmr+YE6AC4TOYuHwAxYbyzABE39nkE6C5mfHBPW1 DvvmPijv/VvL2w5GHoOtoT62ISqW5OeF2zr2wSMDtaeOdKWYEtgiUJZaer852T+qwKFx CVJw== 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 d14-v6si2260322plj.57.2018.06.20.02.10.05; Wed, 20 Jun 2018 02:10:19 -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 S1754609AbeFTJIk (ORCPT + 99 others); Wed, 20 Jun 2018 05:08:40 -0400 Received: from foss.arm.com ([217.140.101.70]:34002 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752308AbeFTJGr (ORCPT ); Wed, 20 Jun 2018 05:06:47 -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 34FC0164F; Wed, 20 Jun 2018 02:06:47 -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 B24CF3F246; Wed, 20 Jun 2018 02:06:45 -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: [PATCHv3 5/9] sched/fair: Kick nohz balance if rq->misfit_task Date: Wed, 20 Jun 2018 10:05:45 +0100 Message-Id: <1529485549-5191-6-git-send-email-morten.rasmussen@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1529485549-5191-1-git-send-email-morten.rasmussen@arm.com> References: <1529485549-5191-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 11f3efa299ca..b29d53d1e22a 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9507,7 +9507,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