From patchwork Thu Apr 25 17:23:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 2489091 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id 7F9E6DF5B1 for ; Thu, 25 Apr 2013 17:28:08 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UVPwP-0001PC-0s; Thu, 25 Apr 2013 17:26:41 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UVPvo-0006rv-BF; Thu, 25 Apr 2013 17:26:04 +0000 Received: from mail-wg0-x22c.google.com ([2a00:1450:400c:c00::22c]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UVPum-0006ga-1O for linux-arm-kernel@lists.infradead.org; Thu, 25 Apr 2013 17:25:09 +0000 Received: by mail-wg0-f44.google.com with SMTP id a12so1624348wgh.35 for ; Thu, 25 Apr 2013 10:24:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=hga3RQv+FJBo1rNuH7XXcAQ1HAjG5GeBs88hj7eyn/s=; b=QiVAumfnxZ0S0UtjxKCHU3NWJJJT8P4vYio1MbAh2uxjCLx8tzzgk4fNdNTI1pIyYH t6HD0UX8jTwEFwDPKxLWY45X6ZJnCY1j/PXLHkuNqitqpqtgo4gtEPeq8rzyEp/NR/Hx fiR2LvXXx9yh/FREtRyIZf+lDAQ77/6xWvETDNTBMlDusMRju5UPR46PHqcKGJT+XIPX Huc3In8HP4WUil2tzJ6Y3OJOeK2Jq4vNhBhHwX+9EhOGENifFCm2H0AZauWJ0YFV9QwK F0dewnLNWq7Maeix5hKOlMuFGA3i1dpwHNlf/nQ24+rrs4QInsd46n2Z1z71ZDrvOu/q TBQQ== X-Received: by 10.180.205.135 with SMTP id lg7mr61158531wic.11.1366910698576; Thu, 25 Apr 2013 10:24:58 -0700 (PDT) Received: from localhost.localdomain (LPuteaux-156-14-44-212.w82-127.abo.wanadoo.fr. [82.127.83.212]) by mx.google.com with ESMTPSA id q13sm12311485wie.8.2013.04.25.10.24.56 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 25 Apr 2013 10:24:58 -0700 (PDT) From: Vincent Guittot To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, peterz@infradead.org, mingo@kernel.org, linux@arm.linux.org.uk, pjt@google.com, santosh.shilimkar@ti.com, Morten.Rasmussen@arm.com, chander.kashyap@linaro.org, cmetcalf@tilera.com, tony.luck@intel.com, alex.shi@intel.com, preeti@linux.vnet.ibm.com Subject: [PATCH 05/14] ARM: sched: clear SD_SHARE_POWERDOMAIN Date: Thu, 25 Apr 2013 19:23:21 +0200 Message-Id: <1366910611-20048-6-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1366910611-20048-1-git-send-email-vincent.guittot@linaro.org> References: <1366910611-20048-1-git-send-email-vincent.guittot@linaro.org> X-Gm-Message-State: ALoCoQlXLB8sL5VD5sq3NwimF78QObJosJdpECj+YEunnIlcM0t1A6k6lIaJ1lz/J565DmtWniwk X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130425_132500_260848_F9FFF180 X-CRM114-Status: GOOD ( 11.18 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: len.brown@intel.com, l.majewski@samsung.com, Vincent Guittot , corbet@lwn.net, amit.kucheria@linaro.org, tglx@linutronix.de, paulmck@linux.vnet.ibm.com, arjan@linux.intel.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The ARM platforms take advantage of packing small tasks on few cores. This is true even when the cores of a cluster can't be power gated independantly. So we clear SD_SHARE_POWERDOMAIN at MC and CPU level. Signed-off-by: Vincent Guittot Reviewed-by: Morten Rasmussen --- arch/arm/kernel/topology.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index 79282eb..f89a4a2 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm/kernel/topology.c @@ -201,6 +201,15 @@ static inline void update_cpu_power(unsigned int cpuid, unsigned int mpidr) {} */ struct cputopo_arm cpu_topology[NR_CPUS]; +int arch_sd_local_flags(int level) +{ + /* Powergate at threading level doesn't make sense */ + if (level & SD_SHARE_CPUPOWER) + return 1*SD_SHARE_POWERDOMAIN; + + return 0*SD_SHARE_POWERDOMAIN; +} + const struct cpumask *cpu_coregroup_mask(int cpu) { return &cpu_topology[cpu].core_sibling;