Skip to content

Commit 7673c8a

Browse files
Juri LelliIngo Molnar
authored andcommitted
sched/cpufreq: Remove arch_scale_freq_capacity()'s 'sd' parameter
The 'sd' parameter is never used in arch_scale_freq_capacity() (and it's hard to see where information coming from scheduling domains might help doing frequency invariance scaling). Remove it; also in anticipation of moving arch_scale_freq_capacity() outside CONFIG_SMP. Signed-off-by: Juri Lelli <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 0fa7d18 commit 7673c8a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

include/linux/arch_topology.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void topology_set_cpu_scale(unsigned int cpu, unsigned long capacity);
2727
DECLARE_PER_CPU(unsigned long, freq_scale);
2828

2929
static inline
30-
unsigned long topology_get_freq_scale(struct sched_domain *sd, int cpu)
30+
unsigned long topology_get_freq_scale(int cpu)
3131
{
3232
return per_cpu(freq_scale, cpu);
3333
}

kernel/sched/fair.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3120,7 +3120,7 @@ accumulate_sum(u64 delta, int cpu, struct sched_avg *sa,
31203120
u32 contrib = (u32)delta; /* p == 0 -> delta < 1024 */
31213121
u64 periods;
31223122

3123-
scale_freq = arch_scale_freq_capacity(NULL, cpu);
3123+
scale_freq = arch_scale_freq_capacity(cpu);
31243124
scale_cpu = arch_scale_cpu_capacity(NULL, cpu);
31253125

31263126
delta += sa->period_contrib;

kernel/sched/sched.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1675,7 +1675,7 @@ extern void sched_avg_update(struct rq *rq);
16751675

16761676
#ifndef arch_scale_freq_capacity
16771677
static __always_inline
1678-
unsigned long arch_scale_freq_capacity(struct sched_domain *sd, int cpu)
1678+
unsigned long arch_scale_freq_capacity(int cpu)
16791679
{
16801680
return SCHED_CAPACITY_SCALE;
16811681
}
@@ -1694,7 +1694,7 @@ unsigned long arch_scale_cpu_capacity(struct sched_domain *sd, int cpu)
16941694

16951695
static inline void sched_rt_avg_update(struct rq *rq, u64 rt_delta)
16961696
{
1697-
rq->rt_avg += rt_delta * arch_scale_freq_capacity(NULL, cpu_of(rq));
1697+
rq->rt_avg += rt_delta * arch_scale_freq_capacity(cpu_of(rq));
16981698
sched_avg_update(rq);
16991699
}
17001700
#else

0 commit comments

Comments
 (0)