From patchwork Thu Jan 28 23:20:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jschopp@austin.ibm.com X-Patchwork-Id: 43881 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 760ACB8152 for ; Fri, 29 Jan 2010 10:21:11 +1100 (EST) Received: from e37.co.us.ibm.com (e37.co.us.ibm.com [32.97.110.158]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e37.co.us.ibm.com", Issuer "Equifax" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 9AFF5B7D15 for ; Fri, 29 Jan 2010 10:21:01 +1100 (EST) Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by e37.co.us.ibm.com (8.14.3/8.13.1) with ESMTP id o0SNJQ2l013387 for ; Thu, 28 Jan 2010 16:19:26 -0700 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o0SNKcda088422 for ; Thu, 28 Jan 2010 16:20:39 -0700 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o0SNKbeO031742 for ; Thu, 28 Jan 2010 16:20:38 -0700 Received: from [9.65.71.7] (sig-9-65-71-7.mts.ibm.com [9.65.71.7]) by d03av01.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id o0SNKZwh031180; Thu, 28 Jan 2010 16:20:36 -0700 Subject: [PATCHv3 1/2] sched: enable ARCH_POWER From: Joel Schopp To: Peter Zijlstra In-Reply-To: <1264548486.12239.55.camel@jschopp-laptop> References: <1264017638.5717.121.camel@jschopp-laptop> <1264017764.5717.127.camel@jschopp-laptop> <1264548486.12239.55.camel@jschopp-laptop> Date: Thu, 28 Jan 2010 17:20:33 -0600 Message-ID: <1264720833.9660.21.camel@jschopp-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Cc: ego@in.ibm.com, linux-kernel@vger.kernel.org, Ingo Molnar , linuxppc-dev@lists.ozlabs.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Enable the scheduler feature that allows use of arch_scale_smt_power. Stub out the broken x86 implementation. Signed-off-by: Joel Schopp Index: linux-2.6.git/kernel/sched_features.h =================================================================== --- linux-2.6.git.orig/kernel/sched_features.h +++ linux-2.6.git/kernel/sched_features.h @@ -102,7 +102,7 @@ SCHED_FEAT(CACHE_HOT_BUDDY, 1) /* * Use arch dependent cpu power functions */ -SCHED_FEAT(ARCH_POWER, 0) +SCHED_FEAT(ARCH_POWER, 1) SCHED_FEAT(HRTICK, 0) SCHED_FEAT(DOUBLE_TICK, 0) Index: linux-2.6.git/arch/x86/kernel/cpu/sched.c =================================================================== --- linux-2.6.git.orig/arch/x86/kernel/cpu/sched.c +++ linux-2.6.git/arch/x86/kernel/cpu/sched.c @@ -44,11 +44,9 @@ unsigned long arch_scale_freq_power(stru unsigned long arch_scale_smt_power(struct sched_domain *sd, int cpu) { /* - * aperf/mperf already includes the smt gain + * aperf/mperf already includes the smt gain, but represents capacity + * as 0 when idle. So for now just return default. */ - if (boot_cpu_has(X86_FEATURE_APERFMPERF)) - return SCHED_LOAD_SCALE; - return default_scale_smt_power(sd, cpu); }