Skip to content

Commit 0e1fef6

Browse files
deggemanIngo Molnar
authored andcommitted
sched/core: Remove sd->*_idx
The sched domain per rq load index files also disappear from the /proc/sys/kernel/sched_domain/cpuX/domainY directories. Signed-off-by: Dietmar Eggemann <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Acked-by: Rik van Riel <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Morten Rasmussen <[email protected]> Cc: Patrick Bellasi <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Quentin Perret <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Valentin Schneider <[email protected]> Cc: Vincent Guittot <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 55627e3 commit 0e1fef6

File tree

3 files changed

+10
-30
lines changed

3 files changed

+10
-30
lines changed

include/linux/sched/topology.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,6 @@ struct sched_domain {
8484
unsigned int busy_factor; /* less balancing by factor if busy */
8585
unsigned int imbalance_pct; /* No balance until over watermark */
8686
unsigned int cache_nice_tries; /* Leave cache hot tasks for # tries */
87-
unsigned int busy_idx;
88-
unsigned int idle_idx;
89-
unsigned int newidle_idx;
90-
unsigned int wake_idx;
91-
unsigned int forkexec_idx;
9287

9388
int nohz_idle; /* NOHZ IDLE status */
9489
int flags; /* See SD_* */

kernel/sched/debug.c

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -251,25 +251,20 @@ set_table_entry(struct ctl_table *entry,
251251
static struct ctl_table *
252252
sd_alloc_ctl_domain_table(struct sched_domain *sd)
253253
{
254-
struct ctl_table *table = sd_alloc_ctl_entry(14);
254+
struct ctl_table *table = sd_alloc_ctl_entry(9);
255255

256256
if (table == NULL)
257257
return NULL;
258258

259-
set_table_entry(&table[0], "min_interval", &sd->min_interval, sizeof(long), 0644, proc_doulongvec_minmax);
260-
set_table_entry(&table[1], "max_interval", &sd->max_interval, sizeof(long), 0644, proc_doulongvec_minmax);
261-
set_table_entry(&table[2], "busy_idx", &sd->busy_idx, sizeof(int), 0644, proc_dointvec_minmax);
262-
set_table_entry(&table[3], "idle_idx", &sd->idle_idx, sizeof(int), 0644, proc_dointvec_minmax);
263-
set_table_entry(&table[4], "newidle_idx", &sd->newidle_idx, sizeof(int), 0644, proc_dointvec_minmax);
264-
set_table_entry(&table[5], "wake_idx", &sd->wake_idx, sizeof(int), 0644, proc_dointvec_minmax);
265-
set_table_entry(&table[6], "forkexec_idx", &sd->forkexec_idx, sizeof(int), 0644, proc_dointvec_minmax);
266-
set_table_entry(&table[7], "busy_factor", &sd->busy_factor, sizeof(int), 0644, proc_dointvec_minmax);
267-
set_table_entry(&table[8], "imbalance_pct", &sd->imbalance_pct, sizeof(int), 0644, proc_dointvec_minmax);
268-
set_table_entry(&table[9], "cache_nice_tries", &sd->cache_nice_tries, sizeof(int), 0644, proc_dointvec_minmax);
269-
set_table_entry(&table[10], "flags", &sd->flags, sizeof(int), 0644, proc_dointvec_minmax);
270-
set_table_entry(&table[11], "max_newidle_lb_cost", &sd->max_newidle_lb_cost, sizeof(long), 0644, proc_doulongvec_minmax);
271-
set_table_entry(&table[12], "name", sd->name, CORENAME_MAX_SIZE, 0444, proc_dostring);
272-
/* &table[13] is terminator */
259+
set_table_entry(&table[0], "min_interval", &sd->min_interval, sizeof(long), 0644, proc_doulongvec_minmax);
260+
set_table_entry(&table[1], "max_interval", &sd->max_interval, sizeof(long), 0644, proc_doulongvec_minmax);
261+
set_table_entry(&table[2], "busy_factor", &sd->busy_factor, sizeof(int), 0644, proc_dointvec_minmax);
262+
set_table_entry(&table[3], "imbalance_pct", &sd->imbalance_pct, sizeof(int), 0644, proc_dointvec_minmax);
263+
set_table_entry(&table[4], "cache_nice_tries", &sd->cache_nice_tries, sizeof(int), 0644, proc_dointvec_minmax);
264+
set_table_entry(&table[5], "flags", &sd->flags, sizeof(int), 0644, proc_dointvec_minmax);
265+
set_table_entry(&table[6], "max_newidle_lb_cost", &sd->max_newidle_lb_cost, sizeof(long), 0644, proc_doulongvec_minmax);
266+
set_table_entry(&table[7], "name", sd->name, CORENAME_MAX_SIZE, 0444, proc_dostring);
267+
/* &table[8] is terminator */
273268

274269
return table;
275270
}

kernel/sched/topology.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,11 +1344,6 @@ sd_init(struct sched_domain_topology_level *tl,
13441344
.imbalance_pct = 125,
13451345

13461346
.cache_nice_tries = 0,
1347-
.busy_idx = 0,
1348-
.idle_idx = 0,
1349-
.newidle_idx = 0,
1350-
.wake_idx = 0,
1351-
.forkexec_idx = 0,
13521347

13531348
.flags = 1*SD_LOAD_BALANCE
13541349
| 1*SD_BALANCE_NEWIDLE
@@ -1400,13 +1395,10 @@ sd_init(struct sched_domain_topology_level *tl,
14001395
} else if (sd->flags & SD_SHARE_PKG_RESOURCES) {
14011396
sd->imbalance_pct = 117;
14021397
sd->cache_nice_tries = 1;
1403-
sd->busy_idx = 2;
14041398

14051399
#ifdef CONFIG_NUMA
14061400
} else if (sd->flags & SD_NUMA) {
14071401
sd->cache_nice_tries = 2;
1408-
sd->busy_idx = 3;
1409-
sd->idle_idx = 2;
14101402

14111403
sd->flags &= ~SD_PREFER_SIBLING;
14121404
sd->flags |= SD_SERIALIZE;
@@ -1419,8 +1411,6 @@ sd_init(struct sched_domain_topology_level *tl,
14191411
#endif
14201412
} else {
14211413
sd->cache_nice_tries = 1;
1422-
sd->busy_idx = 2;
1423-
sd->idle_idx = 1;
14241414
}
14251415

14261416
/*

0 commit comments

Comments
 (0)