From patchwork Mon Jun 30 16:05:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 4452821 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 020A7BEEAA for ; Mon, 30 Jun 2014 16:12:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 35BE120328 for ; Mon, 30 Jun 2014 16:12:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 56A2C202F8 for ; Mon, 30 Jun 2014 16:12:34 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X1eAC-0002B7-7o; Mon, 30 Jun 2014 16:10:40 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X1e7C-0006Zn-0S for linux-arm-kernel@bombadil.infradead.org; Mon, 30 Jun 2014 16:07:34 +0000 Received: from mail-we0-f176.google.com ([74.125.82.176]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X1e6z-0003mD-4x for linux-arm-kernel@lists.infradead.org; Mon, 30 Jun 2014 16:07:27 +0000 Received: by mail-we0-f176.google.com with SMTP id u56so8481193wes.7 for ; Mon, 30 Jun 2014 09:06:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=92rhiLLAxv67Q2MKmwjCnhD9c2u2qj4ng7xE/swCaq0=; b=LBnAuf5ttD59g/GkmEvN36AQ5jGcitf6xRchhr2BYU/LJmFTMY3Q9tj5HaZspjTtxG URTm1YQ+Yyck3QBw53oxSWMPzgX6bb48KmK4KUwUk3efk+Bq7/OHHgMFyJ6W4A45kQ3J N7XFNqTp1hSJDJ4J5Ljta67mUXXQgm0cBALCZjQ31ikJfpy+OtRwEYErq2Xgc7KdplCa puRjA5f0JXP3VIhb8ruGY3tORh8pC4LIPoJ+Me7Ov0eSAeprA95l23e6k+RMr54r+P9a ps8kL0LvpoVDkCXwmYi0ipk4tmy2Af3J19jWBaY9xnPtcOd840rjWnZkNIdJUV71MJOe Ehsw== X-Gm-Message-State: ALoCoQk7AQtLBy/cwWekEO06jUU76hkQJ8XVy3l+OH1AVLYcJF4Fn0fbXkA/SO/WyriV8YS22MWl X-Received: by 10.180.207.48 with SMTP id lt16mr30731526wic.32.1404144414904; Mon, 30 Jun 2014 09:06:54 -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 lo18sm32896271wic.1.2014.06.30.09.06.53 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 30 Jun 2014 09:06:54 -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 Subject: [PATCH v3 06/12] sched: add per rq cpu_power_orig Date: Mon, 30 Jun 2014 18:05:37 +0200 Message-Id: <1404144343-18720-7-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1404144343-18720-1-git-send-email-vincent.guittot@linaro.org> References: <1404144343-18720-1-git-send-email-vincent.guittot@linaro.org> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.6 (--) Cc: nicolas.pitre@linaro.org, efault@gmx.de, Vincent Guittot , daniel.lezcano@linaro.org, dietmar.eggemann@arm.com, linaro-kernel@lists.linaro.org, preeti@linux.vnet.ibm.com, Morten.Rasmussen@arm.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Rik van Riel --- 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 54f5722..92dd6d1 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -6964,7 +6964,7 @@ void __init sched_init(void) #ifdef CONFIG_SMP rq->sd = NULL; rq->rd = NULL; - rq->cpu_capacity = SCHED_CAPACITY_SCALE; + rq->cpu_capacity = rq->cpu_capacity_orig = SCHED_CAPACITY_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 f0bba5f..7dff578 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5671,6 +5671,7 @@ static void update_cpu_capacity(struct sched_domain *sd, int cpu) capacity >>= SCHED_CAPACITY_SHIFT; + cpu_rq(cpu)->cpu_capacity_orig = capacity; sdg->sgc->capacity_orig = capacity; if (sched_feat(ARCH_CAPACITY)) diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 2f86361..7b311de 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -568,6 +568,7 @@ struct rq { struct sched_domain *sd; unsigned long cpu_capacity; + unsigned long cpu_capacity_orig; unsigned char idle_balance; /* For active balancing */