From patchwork Mon May 23 10:58:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Morten Rasmussen X-Patchwork-Id: 68362 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp13622qge; Mon, 23 May 2016 03:59:30 -0700 (PDT) X-Received: by 10.98.22.141 with SMTP id 135mr18775881pfw.116.1464001169969; Mon, 23 May 2016 03:59:29 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l69si11283828pfi.243.2016.05.23.03.59.19; Mon, 23 May 2016 03:59:29 -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 S1754512AbcEWK6x (ORCPT + 30 others); Mon, 23 May 2016 06:58:53 -0400 Received: from foss.arm.com ([217.140.101.70]:50205 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754493AbcEWK6u (ORCPT ); Mon, 23 May 2016 06:58:50 -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 EEF6E471; Mon, 23 May 2016 03:59:11 -0700 (PDT) Received: from e105550-lin.cambridge.arm.com (e105550-lin.cambridge.arm.com [10.1.207.130]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7B3023F246; Mon, 23 May 2016 03:58:48 -0700 (PDT) From: Morten Rasmussen To: peterz@infradead.org, mingo@redhat.com Cc: dietmar.eggemann@arm.com, yuyang.du@intel.com, vincent.guittot@linaro.org, mgalbraith@suse.de, linux-kernel@vger.kernel.org, Morten Rasmussen , Russell King Subject: [PATCH 15/16] arm: Set SD_BALANCE_WAKE flag for asymmetric capacity systems Date: Mon, 23 May 2016 11:58:57 +0100 Message-Id: <1464001138-25063-16-git-send-email-morten.rasmussen@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1464001138-25063-1-git-send-email-morten.rasmussen@arm.com> References: <1464001138-25063-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 Asymmetric capacity systems (e.g. ARM big.LITTLE) can not rely exclusively on fast idle-based task placement at wake-up in all scenarios. Enable SD_BALANCE_WAKE to have the option to do load/utilization based wake-up task placement (existing tasks) if affine wake-up fails. cc: Russell King Signed-off-by: Morten Rasmussen --- arch/arm/kernel/topology.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) -- 1.9.1 diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index 1b81b31..32d0a1b 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm/kernel/topology.c @@ -280,18 +280,27 @@ void store_cpu_topology(unsigned int cpuid) static inline int cpu_corepower_flags(void) { - return SD_SHARE_PKG_RESOURCES | SD_SHARE_POWERDOMAIN; + int flags = SD_SHARE_PKG_RESOURCES | SD_SHARE_POWERDOMAIN; + + return big_little ? flags | SD_BALANCE_WAKE : flags; +} + +static inline int arm_cpu_core_flags(void) +{ + int flags = SD_SHARE_PKG_RESOURCES; + + return big_little ? flags | SD_BALANCE_WAKE : flags; } static inline int arm_cpu_cpu_flags(void) { - return big_little ? SD_ASYM_CPUCAPACITY : 0; + return big_little ? SD_ASYM_CPUCAPACITY | SD_BALANCE_WAKE : 0; } static struct sched_domain_topology_level arm_topology[] = { #ifdef CONFIG_SCHED_MC { cpu_corepower_mask, cpu_corepower_flags, SD_INIT_NAME(GMC) }, - { cpu_coregroup_mask, cpu_core_flags, SD_INIT_NAME(MC) }, + { cpu_coregroup_mask, arm_cpu_core_flags, SD_INIT_NAME(MC) }, #endif { cpu_cpu_mask, arm_cpu_cpu_flags, SD_INIT_NAME(DIE) }, { NULL, },