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: 15539 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 5E20323DEE for ; Fri, 22 Mar 2013 12:29:50 +0000 (UTC) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by fiordland.canonical.com (Postfix) with ESMTP id 1178FA18134 for ; Fri, 22 Mar 2013 12:29:49 +0000 (UTC) Received: by mail-ve0-f174.google.com with SMTP id jz10so638860veb.33 for ; Fri, 22 Mar 2013 05:29:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=hga3RQv+FJBo1rNuH7XXcAQ1HAjG5GeBs88hj7eyn/s=; b=K46JjTNRrI+stuvTdhZzIUI85c3VcnUYm2y09xpliu0dcvMoj4z9rYeW0yj/IggRrS Jm5oBsfB423nYtKRa15ayLimvgLNGAP//K5lQqvtDnu34W/TRVx9cQo6bH1smheJoRXJ LiB8jnTFBiR9td1JfB2de11fymvme7PnsqoQIFjx9FE3l8qGwhQ6TW70pz0ixXzOuFlY 8G/lWLaZdEJWNDHf8XM6xsdnfjIBRjD94qxLq7a9uJvg1IqN26Wa1jt5rEfJxYW/gml4 BX6y98Q2Q93ZgVVNYPn1+/eKDqDrM+rgCSs2IJMzOKBZ2+sThPC3m1XqTbjpedzI0R6/ WKsQ== X-Received: by 10.52.93.20 with SMTP id cq20mr1655153vdb.38.1363955389604; Fri, 22 Mar 2013 05:29:49 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.233.198 with SMTP id ty6csp102076vec; Fri, 22 Mar 2013 05:29:48 -0700 (PDT) X-Received: by 10.194.90.168 with SMTP id bx8mr2634931wjb.59.1363955387852; Fri, 22 Mar 2013 05:29:47 -0700 (PDT) Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) by mx.google.com with ESMTPS id ci2si846437wib.77.2013.03.22.05.29.47 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 22 Mar 2013 05:29:47 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.54 is neither permitted nor denied by best guess record for domain of vincent.guittot@linaro.org) client-ip=74.125.82.54; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.54 is neither permitted nor denied by best guess record for domain of vincent.guittot@linaro.org) smtp.mail=vincent.guittot@linaro.org Received: by mail-wg0-f54.google.com with SMTP id fm10so202139wgb.9 for ; Fri, 22 Mar 2013 05:29:47 -0700 (PDT) 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 Cc: alex.shi@intel.com, preeti@linux.vnet.ibm.com, paulmck@linux.vnet.ibm.com, tglx@linutronix.de, len.brown@intel.com, arjan@linux.intel.com, amit.kucheria@linaro.org, corbet@lwn.net, Vincent Guittot 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: ALoCoQnD0LJ8z4LhVNoEnipjmobtYkH5x+P1icd7JIma1IaSQQDcyLhGskh2i5wyKFz8i0e41MDe 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;