From patchwork Fri Feb 27 15:54:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 45251 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f198.google.com (mail-we0-f198.google.com [74.125.82.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3F98D20674 for ; Fri, 27 Feb 2015 15:57:18 +0000 (UTC) Received: by wesw55 with SMTP id w55sf14878394wes.0 for ; Fri, 27 Feb 2015 07:57:17 -0800 (PST) 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:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=cFs6HZSXrUIoNuYBXEOdpE44cqnNqzYWJsPLlx4grXk=; b=fV/gqU+daDW40f+bFON4DhI7qE1h4DouedhjKrsHu3AdAPVcLeVKoGg9oRDuil22mL ZZ7PXuzkvtCEEmx9oPT54iGrJ2C8yRAu9o6C9JQfkA5jzcXwzf55RU9IOhxMxg2A/c2i I4K/ppzRLtKCbovCnmI24Freq+IKIWnVSfqPNxrd0hITlgg85pFIPlRiqgJoYIOPfh8+ lP6Pa+wWCkC+HQRYcpWBOI2bE3TfcuZ/MrdOgGcFqvnRicRkXbg4AqJXe72HznqbftCu SQp7p+mipvIak33yb1brzBJWnnlJ44XrR4ebxaevo2kPYISWXJOUWyCURM7lGBGA0gnR DOPg== X-Gm-Message-State: ALoCoQmCE7DmcJP8pAcX7hRtV5XejCsVCVyBvAYIQZAGlbSwN8O9kd++Q2rSW1SEgkvWMfg7Dj3M X-Received: by 10.112.167.98 with SMTP id zn2mr2133217lbb.6.1425052637499; Fri, 27 Feb 2015 07:57:17 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.71 with SMTP id r7ls188599lag.42.gmail; Fri, 27 Feb 2015 07:57:17 -0800 (PST) X-Received: by 10.152.37.166 with SMTP id z6mr12230436laj.71.1425052637328; Fri, 27 Feb 2015 07:57:17 -0800 (PST) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by mx.google.com with ESMTPS id bl8si3211697lbb.70.2015.02.27.07.57.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Feb 2015 07:57:17 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by lbvp9 with SMTP id p9so18210296lbv.0 for ; Fri, 27 Feb 2015 07:57:17 -0800 (PST) X-Received: by 10.112.188.165 with SMTP id gb5mr13449021lbc.35.1425052637131; Fri, 27 Feb 2015 07:57:17 -0800 (PST) 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.112.35.133 with SMTP id h5csp4028884lbj; Fri, 27 Feb 2015 07:57:15 -0800 (PST) X-Received: by 10.68.189.105 with SMTP id gh9mr24724133pbc.142.1425052633758; Fri, 27 Feb 2015 07:57:13 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t5si4156259pdm.178.2015.02.27.07.57.11; Fri, 27 Feb 2015 07:57:13 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932133AbbB0PzZ (ORCPT + 28 others); Fri, 27 Feb 2015 10:55:25 -0500 Received: from mail-we0-f173.google.com ([74.125.82.173]:38427 "EHLO mail-we0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754886AbbB0PzU (ORCPT ); Fri, 27 Feb 2015 10:55:20 -0500 Received: by wesw55 with SMTP id w55so21201445wes.5 for ; Fri, 27 Feb 2015 07:55:19 -0800 (PST) X-Received: by 10.194.122.38 with SMTP id lp6mr30001284wjb.24.1425052519464; Fri, 27 Feb 2015 07:55:19 -0800 (PST) Received: from lmenx30s.lme.st.com (LPuteaux-656-1-48-212.w82-127.abo.wanadoo.fr. [82.127.83.212]) by mx.google.com with ESMTPSA id y3sm6519459wju.14.2015.02.27.07.55.16 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 27 Feb 2015 07:55:18 -0800 (PST) From: Vincent Guittot To: peterz@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org, preeti@linux.vnet.ibm.com, Morten.Rasmussen@arm.com, kamalesh@linux.vnet.ibm.com Cc: riel@redhat.com, efault@gmx.de, nicolas.pitre@linaro.org, dietmar.eggemann@arm.com, linaro-kernel@lists.linaro.org, Vincent Guittot Subject: [PATCH v10 09/11] sched; remove unused capacity_orig from Date: Fri, 27 Feb 2015 16:54:12 +0100 Message-Id: <1425052454-25797-10-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1425052454-25797-1-git-send-email-vincent.guittot@linaro.org> References: <1425052454-25797-1-git-send-email-vincent.guittot@linaro.org> 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=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) 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: , Signed-off-by: Vincent Guittot --- kernel/sched/core.c | 12 ------------ kernel/sched/fair.c | 13 +++---------- kernel/sched/sched.h | 2 +- 3 files changed, 4 insertions(+), 23 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 28e3ec2..29f7037 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5446,17 +5446,6 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level, break; } - /* - * Even though we initialize ->capacity to something semi-sane, - * we leave capacity_orig unset. This allows us to detect if - * domain iteration is still funny without causing /0 traps. - */ - if (!group->sgc->capacity_orig) { - printk(KERN_CONT "\n"); - printk(KERN_ERR "ERROR: domain->cpu_capacity not set\n"); - break; - } - if (!cpumask_weight(sched_group_cpus(group))) { printk(KERN_CONT "\n"); printk(KERN_ERR "ERROR: empty group\n"); @@ -5941,7 +5930,6 @@ build_overlap_sched_groups(struct sched_domain *sd, int cpu) * die on a /0 trap. */ sg->sgc->capacity = SCHED_CAPACITY_SCALE * cpumask_weight(sg_span); - sg->sgc->capacity_orig = sg->sgc->capacity; /* * Make sure the first group of this domain contains the diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 9d7431f..7420d21 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6073,7 +6073,6 @@ 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; capacity *= scale_rt_capacity(cpu); capacity >>= SCHED_CAPACITY_SHIFT; @@ -6089,7 +6088,7 @@ void update_group_capacity(struct sched_domain *sd, int cpu) { struct sched_domain *child = sd->child; struct sched_group *group, *sdg = sd->groups; - unsigned long capacity, capacity_orig; + unsigned long capacity; unsigned long interval; interval = msecs_to_jiffies(sd->balance_interval); @@ -6101,7 +6100,7 @@ void update_group_capacity(struct sched_domain *sd, int cpu) return; } - capacity_orig = capacity = 0; + capacity = 0; if (child->flags & SD_OVERLAP) { /* @@ -6121,19 +6120,15 @@ void update_group_capacity(struct sched_domain *sd, int cpu) * Use capacity_of(), which is set irrespective of domains * in update_cpu_capacity(). * - * This avoids capacity/capacity_orig from being 0 and + * This avoids capacity from being 0 and * causing divide-by-zero issues on boot. - * - * Runtime updates will correct capacity_orig. */ if (unlikely(!rq->sd)) { - capacity_orig += capacity_orig_of(cpu); capacity += capacity_of(cpu); continue; } sgc = rq->sd->groups->sgc; - capacity_orig += sgc->capacity_orig; capacity += sgc->capacity; } } else { @@ -6144,13 +6139,11 @@ void update_group_capacity(struct sched_domain *sd, int cpu) group = child->groups; do { - capacity_orig += group->sgc->capacity_orig; capacity += group->sgc->capacity; group = group->next; } while (group != child->groups); } - sdg->sgc->capacity_orig = capacity_orig; sdg->sgc->capacity = capacity; } diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 9f06d24..24c4aaf 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -814,7 +814,7 @@ struct sched_group_capacity { * CPU capacity of this group, SCHED_LOAD_SCALE being max capacity * for a single CPU. */ - unsigned int capacity, capacity_orig; + unsigned int capacity; unsigned long next_update; int imbalance; /* XXX unrelated to capacity but shared group state */ /*