From patchwork Fri Mar 22 12:25:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 2319411 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id C9AA7DFE82 for ; Fri, 22 Mar 2013 12:34:30 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UJ18c-0004sW-Ib; Fri, 22 Mar 2013 12:32:02 +0000 Received: from mail-we0-x22e.google.com ([2a00:1450:400c:c03::22e]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UJ16T-00047S-KU for linux-arm-kernel@lists.infradead.org; Fri, 22 Mar 2013 12:30:00 +0000 Received: by mail-we0-f174.google.com with SMTP id r6so3211570wey.19 for ; Fri, 22 Mar 2013 05:29:47 -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=KpK79zKq25L9EhDFzvONuX6QT0C5pjXmTPU1aehNUZeYNekhqvQjPbZ1ReRs2Y/3Mp P1oP9cW59nXelC69m41KtukIBPdCprf9S9JkzxsmTL6EHUbd9lJzQ0F4ompmQN7kSsuN 3FKODuLwXnOrnLtDg+5A6yySULZ5r5xPtHU9r1ncmUjlocKi0yDLB8cZr0G67+WYhDUf BqPinkl+m1rFdxyDdUa7qT8flLfvyiC0PReotXo6dkhmi4Bm2fa34azX1mAldOcdbhUG tUZYMIeho+wSHa9L3og+3Hlm4tLzWaBZgIdljXHfZrZi7FEUKaWcM0rttkpY2rIMewED jsLQ== X-Received: by 10.180.109.82 with SMTP id hq18mr2767352wib.0.1363955387292; Fri, 22 Mar 2013 05:29:47 -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 ESMTPS id f1sm3237642wib.0.2013.03.22.05.29.44 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 22 Mar 2013 05:29:46 -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 Subject: [RFC PATCH v3 6/6] ARM: sched: clear SD_SHARE_POWERDOMAIN Date: Fri, 22 Mar 2013 13:25:55 +0100 Message-Id: <1363955155-18382-7-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1363955155-18382-1-git-send-email-vincent.guittot@linaro.org> References: <1363955155-18382-1-git-send-email-vincent.guittot@linaro.org> X-Gm-Message-State: ALoCoQlD1jCg0pRNPDXBIxLUFswXI1fhejiRfVafOVWRnBIyvWWxdDmd3lsJKuSfnL69dx7habg8 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130322_082950_028700_4261173D X-CRM114-Status: GOOD ( 10.69 ) 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, alex.shi@intel.com, Vincent Guittot , corbet@lwn.net, amit.kucheria@linaro.org, preeti@linux.vnet.ibm.com, 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;