diff options
| author | Vincent Guittot <vincent.guittot@linaro.org> | 2015-03-03 05:35:03 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2015-03-27 04:36:05 -0400 |
| commit | dc7ff76eadb4b89fd39bb466b8f3773e5467c11d (patch) | |
| tree | 7ba32c8ffd71f5a9f8daad2061ecb8e2d9e21b6d /kernel | |
| parent | ea67821b9a3edadf602b7772a0b2a69657ced746 (diff) | |
sched: Remove unused struct sched_group_capacity::capacity_orig
The 'struct sched_group_capacity::capacity_orig' field is no longer used
in the scheduler so we can remove it.
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Morten.Rasmussen@arm.com
Cc: dietmar.eggemann@arm.com
Cc: efault@gmx.de
Cc: kamalesh@linux.vnet.ibm.com
Cc: linaro-kernel@lists.linaro.org
Cc: nicolas.pitre@linaro.org
Cc: preeti@linux.vnet.ibm.com
Cc: riel@redhat.com
Link: http://lkml.kernel.org/r/1425378903-5349-1-git-send-email-vincent.guittot@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sched/core.c | 12 | ||||
| -rw-r--r-- | kernel/sched/fair.c | 13 | ||||
| -rw-r--r-- | 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 7022e9084624..838fc9d1e7ab 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
| @@ -5447,17 +5447,6 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level, | |||
| 5447 | break; | 5447 | break; |
| 5448 | } | 5448 | } |
| 5449 | 5449 | ||
| 5450 | /* | ||
| 5451 | * Even though we initialize ->capacity to something semi-sane, | ||
| 5452 | * we leave capacity_orig unset. This allows us to detect if | ||
| 5453 | * domain iteration is still funny without causing /0 traps. | ||
| 5454 | */ | ||
| 5455 | if (!group->sgc->capacity_orig) { | ||
| 5456 | printk(KERN_CONT "\n"); | ||
| 5457 | printk(KERN_ERR "ERROR: domain->cpu_capacity not set\n"); | ||
| 5458 | break; | ||
| 5459 | } | ||
| 5460 | |||
| 5461 | if (!cpumask_weight(sched_group_cpus(group))) { | 5450 | if (!cpumask_weight(sched_group_cpus(group))) { |
| 5462 | printk(KERN_CONT "\n"); | 5451 | printk(KERN_CONT "\n"); |
| 5463 | printk(KERN_ERR "ERROR: empty group\n"); | 5452 | printk(KERN_ERR "ERROR: empty group\n"); |
| @@ -5941,7 +5930,6 @@ build_overlap_sched_groups(struct sched_domain *sd, int cpu) | |||
| 5941 | * die on a /0 trap. | 5930 | * die on a /0 trap. |
| 5942 | */ | 5931 | */ |
| 5943 | sg->sgc->capacity = SCHED_CAPACITY_SCALE * cpumask_weight(sg_span); | 5932 | sg->sgc->capacity = SCHED_CAPACITY_SCALE * cpumask_weight(sg_span); |
| 5944 | sg->sgc->capacity_orig = sg->sgc->capacity; | ||
| 5945 | 5933 | ||
| 5946 | /* | 5934 | /* |
| 5947 | * Make sure the first group of this domain contains the | 5935 | * Make sure the first group of this domain contains the |
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 7e13dd0fd4b5..d36f8d221669 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) | |||
| 6073 | capacity >>= SCHED_CAPACITY_SHIFT; | 6073 | capacity >>= SCHED_CAPACITY_SHIFT; |
| 6074 | 6074 | ||
| 6075 | cpu_rq(cpu)->cpu_capacity_orig = capacity; | 6075 | cpu_rq(cpu)->cpu_capacity_orig = capacity; |
| 6076 | sdg->sgc->capacity_orig = capacity; | ||
| 6077 | 6076 | ||
| 6078 | capacity *= scale_rt_capacity(cpu); | 6077 | capacity *= scale_rt_capacity(cpu); |
| 6079 | capacity >>= SCHED_CAPACITY_SHIFT; | 6078 | capacity >>= SCHED_CAPACITY_SHIFT; |
| @@ -6089,7 +6088,7 @@ void update_group_capacity(struct sched_domain *sd, int cpu) | |||
| 6089 | { | 6088 | { |
| 6090 | struct sched_domain *child = sd->child; | 6089 | struct sched_domain *child = sd->child; |
| 6091 | struct sched_group *group, *sdg = sd->groups; | 6090 | struct sched_group *group, *sdg = sd->groups; |
| 6092 | unsigned long capacity, capacity_orig; | 6091 | unsigned long capacity; |
| 6093 | unsigned long interval; | 6092 | unsigned long interval; |
| 6094 | 6093 | ||
| 6095 | interval = msecs_to_jiffies(sd->balance_interval); | 6094 | interval = msecs_to_jiffies(sd->balance_interval); |
| @@ -6101,7 +6100,7 @@ void update_group_capacity(struct sched_domain *sd, int cpu) | |||
| 6101 | return; | 6100 | return; |
| 6102 | } | 6101 | } |
| 6103 | 6102 | ||
| 6104 | capacity_orig = capacity = 0; | 6103 | capacity = 0; |
| 6105 | 6104 | ||
| 6106 | if (child->flags & SD_OVERLAP) { | 6105 | if (child->flags & SD_OVERLAP) { |
| 6107 | /* | 6106 | /* |
| @@ -6121,19 +6120,15 @@ void update_group_capacity(struct sched_domain *sd, int cpu) | |||
| 6121 | * Use capacity_of(), which is set irrespective of domains | 6120 | * Use capacity_of(), which is set irrespective of domains |
| 6122 | * in update_cpu_capacity(). | 6121 | * in update_cpu_capacity(). |
| 6123 | * | 6122 | * |
| 6124 | * This avoids capacity/capacity_orig from being 0 and | 6123 | * This avoids capacity from being 0 and |
| 6125 | * causing divide-by-zero issues on boot. | 6124 | * causing divide-by-zero issues on boot. |
| 6126 | * | ||
| 6127 | * Runtime updates will correct capacity_orig. | ||
| 6128 | */ | 6125 | */ |
| 6129 | if (unlikely(!rq->sd)) { | 6126 | if (unlikely(!rq->sd)) { |
| 6130 | capacity_orig += capacity_orig_of(cpu); | ||
| 6131 | capacity += capacity_of(cpu); | 6127 | capacity += capacity_of(cpu); |
| 6132 | continue; | 6128 | continue; |
| 6133 | } | 6129 | } |
| 6134 | 6130 | ||
| 6135 | sgc = rq->sd->groups->sgc; | 6131 | sgc = rq->sd->groups->sgc; |
| 6136 | capacity_orig += sgc->capacity_orig; | ||
| 6137 | capacity += sgc->capacity; | 6132 | capacity += sgc->capacity; |
| 6138 | } | 6133 | } |
| 6139 | } else { | 6134 | } else { |
| @@ -6144,13 +6139,11 @@ void update_group_capacity(struct sched_domain *sd, int cpu) | |||
| 6144 | 6139 | ||
| 6145 | group = child->groups; | 6140 | group = child->groups; |
| 6146 | do { | 6141 | do { |
| 6147 | capacity_orig += group->sgc->capacity_orig; | ||
| 6148 | capacity += group->sgc->capacity; | 6142 | capacity += group->sgc->capacity; |
| 6149 | group = group->next; | 6143 | group = group->next; |
| 6150 | } while (group != child->groups); | 6144 | } while (group != child->groups); |
| 6151 | } | 6145 | } |
| 6152 | 6146 | ||
| 6153 | sdg->sgc->capacity_orig = capacity_orig; | ||
| 6154 | sdg->sgc->capacity = capacity; | 6147 | sdg->sgc->capacity = capacity; |
| 6155 | } | 6148 | } |
| 6156 | 6149 | ||
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index be56dfd645b2..dd532c558ad4 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h | |||
| @@ -826,7 +826,7 @@ struct sched_group_capacity { | |||
| 826 | * CPU capacity of this group, SCHED_LOAD_SCALE being max capacity | 826 | * CPU capacity of this group, SCHED_LOAD_SCALE being max capacity |
| 827 | * for a single CPU. | 827 | * for a single CPU. |
| 828 | */ | 828 | */ |
| 829 | unsigned int capacity, capacity_orig; | 829 | unsigned int capacity; |
| 830 | unsigned long next_update; | 830 | unsigned long next_update; |
| 831 | int imbalance; /* XXX unrelated to capacity but shared group state */ | 831 | int imbalance; /* XXX unrelated to capacity but shared group state */ |
| 832 | /* | 832 | /* |
