Skip to contentSkip to conversation

sched: Small cleanups

PATCH Applied Sebastian Andrzej Siewior 2 participants 5 messages Sep 20, 2023 – Sep 21, 2023 Scheduler

lore
Share & tools
lore
#1 lore raw

PATCH 1/2 sched: Remove sysctl sched_child_runs_first.

The sched_child_runs_first knob is no longer connected since commit
5e963f2bd4654 ("sched/fair: Commit to EEVDF")

Remove sched_child_runs_first.

---
 kernel/sched/debug.c |  1 -
 kernel/sched/fair.c  | 13 -------------
 kernel/sched/sched.h |  2 --
 3 files changed, 16 deletions(-)
kernel/sched/debug.c +0 -1
index 4c3d0d9f3db63..132dfd1e6f475 100644
@@ -864,7 +864,6 @@ static void sched_debug_header(struct seq_file *m)
 #define PN(x) \
 	SEQ_printf(m, "  .%-40s: %Ld.%06ld\n", #x, SPLIT_NS(x))
 	PN(sysctl_sched_base_slice);
-	P(sysctl_sched_child_runs_first);
 	P(sysctl_sched_features);
 #undef PN
 #undef P
kernel/sched/fair.c +0 -13
index fcf0c5bc8b478..75720008fdd21 100644
@@ -78,12 +78,6 @@ unsigned int sysctl_sched_tunable_scaling = SCHED_TUNABLESCALING_LOG;
 unsigned int sysctl_sched_base_slice			= 750000ULL;
 static unsigned int normalized_sysctl_sched_base_slice	= 750000ULL;
 
-/*
- * After fork, child runs first. If set to 0 (default) then
- * parent will (try to) run first.
- */
-unsigned int sysctl_sched_child_runs_first __read_mostly;
-
 const_debug unsigned int sysctl_sched_migration_cost	= 500000UL;
 
 int sched_thermal_decay_shift;
@@ -145,13 +139,6 @@ static unsigned int sysctl_numa_balancing_promote_rate_limit = 65536;
 
 #ifdef CONFIG_SYSCTL
 static struct ctl_table sched_fair_sysctls[] = {
-	{
-		.procname       = "sched_child_runs_first",
-		.data           = &sysctl_sched_child_runs_first,
-		.maxlen         = sizeof(unsigned int),
-		.mode           = 0644,
-		.proc_handler   = proc_dointvec,
-	},
 #ifdef CONFIG_CFS_BANDWIDTH
 	{
 		.procname       = "sched_cfs_bandwidth_slice_us",
kernel/sched/sched.h +0 -2
index 7e070dcf70747..9260120ed2a5c 100644
@@ -100,8 +100,6 @@ extern __read_mostly int scheduler_running;
 extern unsigned long calc_load_update;
 extern atomic_long_t calc_load_tasks;
 
-extern unsigned int sysctl_sched_child_runs_first;
-
 extern void calc_global_load_tick(struct rq *this_rq);
 extern long calc_load_fold_active(struct rq *this_rq, long adjust);
 
Signature · 1 line
2.40.1
#2 lore raw

[tip: sched/core] sched/debug: Remove the /proc/sys/kernel/sched_child_runs_first sysctl

The following commit has been merged into the sched/core branch of tip:

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     17e7170645e34c519443ba63895264bbdee7beee
Gitweb:        https://git.kernel.org/tip/17e7170645e34c519443ba63895264bbdee7beee
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Wed, 20 Sep 2023 15:00:24 +02:00
Committer:     Ingo Molnar <[email protected]>
CommitterDate: Thu, 21 Sep 2023 08:30:18 +02:00

sched/debug: Remove the /proc/sys/kernel/sched_child_runs_first sysctl

The /proc/sys/kernel/sched_child_runs_first knob is no longer connected since:

5e963f2bd4654 ("sched/fair: Commit to EEVDF")

Remove it.

---
 kernel/sched/debug.c |  1 -
 kernel/sched/fair.c  | 13 -------------
 kernel/sched/sched.h |  2 --
 3 files changed, 16 deletions(-)
kernel/sched/debug.c +0 -1
index 4c3d0d9..132dfd1 100644
@@ -864,7 +864,6 @@ static void sched_debug_header(struct seq_file *m)
 #define PN(x) \
 	SEQ_printf(m, "  .%-40s: %Ld.%06ld\n", #x, SPLIT_NS(x))
 	PN(sysctl_sched_base_slice);
-	P(sysctl_sched_child_runs_first);
 	P(sysctl_sched_features);
 #undef PN
 #undef P
kernel/sched/fair.c +0 -13
index fcf0c5b..7572000 100644
@@ -78,12 +78,6 @@ unsigned int sysctl_sched_tunable_scaling = SCHED_TUNABLESCALING_LOG;
 unsigned int sysctl_sched_base_slice			= 750000ULL;
 static unsigned int normalized_sysctl_sched_base_slice	= 750000ULL;
 
-/*
- * After fork, child runs first. If set to 0 (default) then
- * parent will (try to) run first.
- */
-unsigned int sysctl_sched_child_runs_first __read_mostly;
-
 const_debug unsigned int sysctl_sched_migration_cost	= 500000UL;
 
 int sched_thermal_decay_shift;
@@ -145,13 +139,6 @@ static unsigned int sysctl_numa_balancing_promote_rate_limit = 65536;
 
 #ifdef CONFIG_SYSCTL
 static struct ctl_table sched_fair_sysctls[] = {
-	{
-		.procname       = "sched_child_runs_first",
-		.data           = &sysctl_sched_child_runs_first,
-		.maxlen         = sizeof(unsigned int),
-		.mode           = 0644,
-		.proc_handler   = proc_dointvec,
-	},
 #ifdef CONFIG_CFS_BANDWIDTH
 	{
 		.procname       = "sched_cfs_bandwidth_slice_us",
kernel/sched/sched.h +0 -2
index 7e070dc..9260120 100644
@@ -100,8 +100,6 @@ extern __read_mostly int scheduler_running;
 extern unsigned long calc_load_update;
 extern atomic_long_t calc_load_tasks;
 
-extern unsigned int sysctl_sched_child_runs_first;
-
 extern void calc_global_load_tick(struct rq *this_rq);
 extern long calc_load_fold_active(struct rq *this_rq, long adjust);
 
#3 lore raw

PATCH 2/2 sched: Update reference to sched_debug.c

In reply to Sebastian Andrzej Siewior

Since commit
8a99b6833c884 ("sched: Move SCHED_DEBUG sysctl to debugfs")

The sched_debug interface moved from /proc to debugfs. The comment mentions still the outdated proc interfaces.

Update the comment, point to the current location of the interface.

---
 kernel/sched/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/debug.c +1 -1
index 132dfd1e6f475..5e34a8cb2c761 100644
@@ -8,7 +8,7 @@
  */
 
 /*
- * This allows printing both to /proc/sched_debug and
+ * This allows printing both to /sys/kernel/debug/sched/debug and
  * to the console
  */
 #define SEQ_printf(m, x...)			\
Signature · 1 line
2.40.1
#4 lore raw

[tip: sched/core] sched/debug: Update stale reference to sched_debug.c

The following commit has been merged into the sched/core branch of tip:

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     622f0a1d544fa88dda10d27727835e825c84ae0f
Gitweb:        https://git.kernel.org/tip/622f0a1d544fa88dda10d27727835e825c84ae0f
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Wed, 20 Sep 2023 15:00:25 +02:00
Committer:     Ingo Molnar <[email protected]>
CommitterDate: Thu, 21 Sep 2023 08:30:19 +02:00

sched/debug: Update stale reference to sched_debug.c

Since commit:

8a99b6833c884 ("sched: Move SCHED_DEBUG sysctl to debugfs")

The sched_debug interface moved from /proc to debugfs. The comment mentions still the outdated proc interfaces.

Update the comment, point to the current location of the interface.

---
 kernel/sched/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/debug.c +1 -1
index 132dfd1..5e34a8c 100644
@@ -8,7 +8,7 @@
  */
 
 /*
- * This allows printing both to /proc/sched_debug and
+ * This allows printing both to /sys/kernel/debug/sched/debug and
  * to the console
  */
 #define SEQ_printf(m, x...)			\