From patchwork Tue Mar 3 10:35:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 45344 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E4A2A21429 for ; Tue, 3 Mar 2015 10:36:36 +0000 (UTC) Received: by wiwl15 with SMTP id l15sf14278421wiw.0 for ; Tue, 03 Mar 2015 02:36:36 -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=nt0qnqTUSwabzxNNljmOGbOfpIFnJOuBDsef5fPN/j4=; b=HouObgKF0j45J6wHeU1TTyC3P79OnUNgMml2X/N9ViwOQ76Z/CfWWSmMOYuMbJYW3H SHxqT9lOkZ0hGLKlVwNP7lJjeILKUnAmCLo7WG/xpBsS/gI7HVhGYqPPSKb3KeLyZmsq 7hrkGrcb5NBfqm33pXv+/bBRbSincFCMuqftZmGrjRt7wC/sWaK+jVzMMrpzUzKCsasA Mf67BSMjPM/llvJZnV/az2+Khk3gXxGy2WeoZBek0xuYUkScIxI4k2/nVaobYDCm+sEP orxxZiK4zOP7p6Oq+8wgu14Yrtnij1jHm/CABjm7Mk+KAQ9mGbkB5CJAT9AinpxIoJxf SM6g== X-Gm-Message-State: ALoCoQmP8Fo9qbdWrNfxWAqMDFzEkRpNC6hO0muAkNeIPuhhHV63YAYiz0Mbd7PgS87dafhamvmI X-Received: by 10.180.80.35 with SMTP id o3mr2894530wix.0.1425378996151; Tue, 03 Mar 2015 02:36:36 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.45.68 with SMTP id k4ls23096lam.53.gmail; Tue, 03 Mar 2015 02:36:35 -0800 (PST) X-Received: by 10.112.11.136 with SMTP id q8mr11730923lbb.30.1425378995917; Tue, 03 Mar 2015 02:36:35 -0800 (PST) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id qj1si264556lbb.41.2015.03.03.02.36.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Mar 2015 02:36:35 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by lams18 with SMTP id s18so36405983lam.13 for ; Tue, 03 Mar 2015 02:36:35 -0800 (PST) X-Received: by 10.152.120.134 with SMTP id lc6mr8391862lab.72.1425378995817; Tue, 03 Mar 2015 02:36:35 -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 h5csp474854lbj; Tue, 3 Mar 2015 02:36:34 -0800 (PST) X-Received: by 10.67.6.193 with SMTP id cw1mr23065091pad.61.1425378994022; Tue, 03 Mar 2015 02:36:34 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y5si599029pdn.35.2015.03.03.02.36.33; Tue, 03 Mar 2015 02:36:34 -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 S1755666AbbCCKg3 (ORCPT + 28 others); Tue, 3 Mar 2015 05:36:29 -0500 Received: from mail-we0-f170.google.com ([74.125.82.170]:46093 "EHLO mail-we0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752994AbbCCKg1 (ORCPT ); Tue, 3 Mar 2015 05:36:27 -0500 Received: by wevm14 with SMTP id m14so38867186wev.13 for ; Tue, 03 Mar 2015 02:36:26 -0800 (PST) X-Received: by 10.180.20.177 with SMTP id o17mr43533586wie.66.1425378986165; Tue, 03 Mar 2015 02:36:26 -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 m4sm1821432wik.20.2015.03.03.02.36.23 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Mar 2015 02:36:25 -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 Date: Tue, 3 Mar 2015 11:35:03 +0100 Message-Id: <1425378903-5349-1-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1425052454-25797-10-git-send-email-vincent.guittot@linaro.org> References: <1425052454-25797-10-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.215.50 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: , capacity_orig field is no more used in the scheduler so we can remove it from struct sched_group_capacity 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 */ /*