[PATCH 4/7] sched: Remove rq->cpu_load[]

From: Dietmar Eggemann
Date: Mon May 27 2019 - 02:24:57 EST


The per rq load array values also disappear from the cpu#X sections in
/proc/sched_debug.

Signed-off-by: Dietmar Eggemann <dietmar.eggemann@xxxxxxx>
---
kernel/sched/core.c | 6 +-----
kernel/sched/debug.c | 5 -----
kernel/sched/sched.h | 2 --
3 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index e8bee37b78fd..068b2dd5e456 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5900,8 +5900,8 @@ DECLARE_PER_CPU(cpumask_var_t, select_idle_mask);

void __init sched_init(void)
{
- int i, j;
unsigned long alloc_size = 0, ptr;
+ int i;

wait_bit_init();

@@ -6003,10 +6003,6 @@ void __init sched_init(void)
#ifdef CONFIG_RT_GROUP_SCHED
init_tg_rt_entry(&root_task_group, &rq->rt, NULL, i, NULL);
#endif
-
- for (j = 0; j < CPU_LOAD_IDX_MAX; j++)
- rq->cpu_load[j] = 0;
-
#ifdef CONFIG_SMP
rq->sd = NULL;
rq->rd = NULL;
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index b070fb61caca..c2eeaa44b274 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -656,11 +656,6 @@ do { \
SEQ_printf(m, " .%-30s: %ld\n", "curr->pid", (long)(task_pid_nr(rq->curr)));
PN(clock);
PN(clock_task);
- P(cpu_load[0]);
- P(cpu_load[1]);
- P(cpu_load[2]);
- P(cpu_load[3]);
- P(cpu_load[4]);
#undef P
#undef PN

diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index a83827eec1d1..e43c29920fa8 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -812,8 +812,6 @@ struct rq {
unsigned int nr_preferred_running;
unsigned int numa_migrate_on;
#endif
- #define CPU_LOAD_IDX_MAX 5
- unsigned long cpu_load[CPU_LOAD_IDX_MAX];
#ifdef CONFIG_NO_HZ_COMMON
#ifdef CONFIG_SMP
unsigned long last_load_update_tick;
--
2.17.1