From patchwork Fri Mar 28 13:27:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 27284 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f72.google.com (mail-yh0-f72.google.com [209.85.213.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E2D1120062 for ; Fri, 28 Mar 2014 13:28:51 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id f10sf11688650yha.3 for ; Fri, 28 Mar 2014 06:28:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=b6WGcjzknf07dPLf8OOUJ8yE3fNA9MQjgoNPYQLeuVk=; b=I5i4VbjCy0AA/9lbMEJhJCNY02wWmcpm9mzGgFRjc5KXMOKP/YD1uExb5tpg7tv4sD j1gZH6/nnK0r/nk+5wFnyJM1yaqzdj8LqRhPCkqCiG1+0+K5gVeGxxpljqFlwcX7dTo7 Ah6jtY3VYnPJfEUUuPL5ZiKu849zlEF866XgzIGtIVrmDGejX1tXYeuwGQbfhdPOmpBT Pi2CH2+T2PURST5sB6fsIX1nk22ezBifRL6iDiHfttTMNEu9srVyDoGCPVZw8DICEiAT aKrIBH+WXv8AWY9sxcXZBpG5q79MjoeS/u39K6rq1hAywnegr9oxuSF9gwJOvXFnMULJ 0dog== X-Gm-Message-State: ALoCoQnwl4JIwFYHkuctU/K5j9uDpretvvMsTMPCQXwVQOzC4jeIWPxx/Ar5tkAAhKvif2hyoegc X-Received: by 10.236.134.98 with SMTP id r62mr2586273yhi.14.1396013331624; Fri, 28 Mar 2014 06:28:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.48.39 with SMTP id n36ls1508122qga.19.gmail; Fri, 28 Mar 2014 06:28:51 -0700 (PDT) X-Received: by 10.58.211.69 with SMTP id na5mr118774vec.30.1396013331506; Fri, 28 Mar 2014 06:28:51 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id dz10si1131382vcb.195.2014.03.28.06.28.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 28 Mar 2014 06:28:51 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id ij19so5766221vcb.24 for ; Fri, 28 Mar 2014 06:28:51 -0700 (PDT) X-Received: by 10.52.33.136 with SMTP id r8mr3201656vdi.2.1396013331429; Fri, 28 Mar 2014 06:28:51 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.12.8 with SMTP id v8csp8691vcv; Fri, 28 Mar 2014 06:28:51 -0700 (PDT) X-Received: by 10.68.254.5 with SMTP id ae5mr8506160pbd.83.1396013330725; Fri, 28 Mar 2014 06:28:50 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id og9si3676495pbb.413.2014.03.28.06.28.50; Fri, 28 Mar 2014 06:28:50 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752055AbaC1N2n (ORCPT + 27 others); Fri, 28 Mar 2014 09:28:43 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:55087 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751290AbaC1N2m (ORCPT ); Fri, 28 Mar 2014 09:28:42 -0400 Received: by mail-wi0-f178.google.com with SMTP id bs8so753899wib.5 for ; Fri, 28 Mar 2014 06:28:41 -0700 (PDT) X-Received: by 10.180.109.231 with SMTP id hv7mr48089266wib.38.1396013321271; Fri, 28 Mar 2014 06:28:41 -0700 (PDT) Received: from lmenx30s.lme.st.com (LPuteaux-656-01-48-212.w82-127.abo.wanadoo.fr. [82.127.83.212]) by mx.google.com with ESMTPSA id n15sm7313365wij.3.2014.03.28.06.28.39 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 28 Mar 2014 06:28:40 -0700 (PDT) From: Vincent Guittot To: peterz@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org, linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org Cc: preeti@linux.vnet.ibm.com, Morten.Rasmussen@arm.com, efault@gmx.de, linaro-kernel@lists.linaro.org, Vincent Guittot Subject: [RFC 4/4] sched: add per group cpu_power_orig Date: Fri, 28 Mar 2014 14:27:26 +0100 Message-Id: <1396013246-6577-1-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 1.9.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: vincent.guittot@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This new field cpu_power_orig reflects the available capacity of a CPUs unlike the cpu_power which reflects the current capacity that can be altered by frequency and rt tasks. Signed-off-by: Vincent Guittot --- kernel/sched/core.c | 2 +- kernel/sched/fair.c | 1 + kernel/sched/sched.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 5b20b27..8513f83 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -6911,7 +6911,7 @@ void __init sched_init(void) #ifdef CONFIG_SMP rq->sd = NULL; rq->rd = NULL; - rq->cpu_power = SCHED_POWER_SCALE; + rq->cpu_power = rq->cpu_power_orig = SCHED_POWER_SCALE; rq->post_schedule = 0; rq->active_balance = 0; rq->next_balance = jiffies; diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 7387c05..f1e4db6 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5611,6 +5611,7 @@ static void update_cpu_power(struct sched_domain *sd, int cpu) power >>= SCHED_POWER_SHIFT; + cpu_rq(cpu)->cpu_power_orig = power; sdg->sgp->power_orig = power; if (sched_feat(ARCH_POWER)) diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 46c3784..2abdf5c 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -578,6 +578,7 @@ struct rq { struct sched_domain *sd; unsigned long cpu_power; + unsigned long cpu_power_orig; unsigned char idle_balance; /* For active balancing */