All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] sched: Move a series of sysctls starting with sys/kernel/sched_*
@ 2022-02-15  5:22 Zhen Ni
  2022-02-15  5:22   ` Zhen Ni
                   ` (8 more replies)
  0 siblings, 9 replies; 17+ messages in thread
From: Zhen Ni @ 2022-02-15  5:22 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, mcgrof, keescook
  Cc: linux-kernel, linux-fsdevel, Zhen Ni

*** BLURB HERE ***

Zhen Ni (8):
  sched: Move child_runs_first sysctls to fair.c
  sched: Move schedstats sysctls to core.c
  sched: Move rt_period/runtime sysctls to rt.c
  sched: Move deadline_period sysctls to deadline.c
  sched: Move rr_timeslice sysctls to rt.c
  sched: Move uclamp_util sysctls to core.c
  sched: Move cfs_bandwidth_slice sysctls to fair.c
  sched: Move energy_aware sysctls to topology.c

 include/linux/sched/sysctl.h | 41 ---------------
 kernel/sched/core.c          | 69 ++++++++++++++++++-------
 kernel/sched/deadline.c      | 42 +++++++++++++---
 kernel/sched/fair.c          | 32 +++++++++++-
 kernel/sched/rt.c            | 56 +++++++++++++++++++--
 kernel/sched/sched.h         |  7 +++
 kernel/sched/topology.c      | 25 +++++++++-
 kernel/sysctl.c              | 97 ------------------------------------
 8 files changed, 199 insertions(+), 170 deletions(-)

-- 
2.20.1




^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/8] sched: Move child_runs_first sysctls to fair.c
  2022-02-15  5:22 [PATCH 0/8] sched: Move a series of sysctls starting with sys/kernel/sched_* Zhen Ni
@ 2022-02-15  5:22   ` Zhen Ni
  2022-02-15  5:22 ` [PATCH 2/8] sched: Move schedstats sysctls to core.c Zhen Ni
                     ` (7 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Zhen Ni @ 2022-02-15  5:22 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, mcgrof, keescook
  Cc: linux-kernel, linux-fsdevel, Zhen Ni

move child_runs_first sysctls to fair.c and use the new
register_sysctl_init() to register the sysctl interface.

Signed-off-by: Zhen Ni <nizhen@uniontech.com>
---
 include/linux/sched/sysctl.h |  2 --
 kernel/sched/fair.c          | 19 +++++++++++++++++++
 kernel/sched/sched.h         |  2 ++
 kernel/sysctl.c              |  7 -------
 4 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/include/linux/sched/sysctl.h b/include/linux/sched/sysctl.h
index 3f2b70f8d32c..5490ba24783a 100644
--- a/include/linux/sched/sysctl.h
+++ b/include/linux/sched/sysctl.h
@@ -14,8 +14,6 @@ extern unsigned long sysctl_hung_task_timeout_secs;
 enum { sysctl_hung_task_timeout_secs = 0 };
 #endif
 
-extern unsigned int sysctl_sched_child_runs_first;
-
 enum sched_tunable_scaling {
 	SCHED_TUNABLESCALING_NONE,
 	SCHED_TUNABLESCALING_LOG,
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 8fc35fd779f8..4ac1bfe8ca4f 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -77,6 +77,25 @@ static unsigned int sched_nr_latency = 8;
  * parent will (try to) run first.
  */
 unsigned int sysctl_sched_child_runs_first __read_mostly;
+#ifdef CONFIG_SYSCTL
+static struct ctl_table sched_child_runs_first_sysctls[] = {
+	{
+		.procname       = "sched_child_runs_first",
+		.data           = &sysctl_sched_child_runs_first,
+		.maxlen         = sizeof(unsigned int),
+		.mode           = 0644,
+		.proc_handler   = proc_dointvec,
+	},
+	{}
+};
+
+static int __init sched_child_runs_first_sysctl_init(void)
+{
+	register_sysctl_init("kernel", sched_child_runs_first_sysctls);
+	return 0;
+}
+late_initcall(sched_child_runs_first_sysctl_init);
+#endif
 
 /*
  * SCHED_OTHER wake-up granularity.
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 9b33ba9c3c42..27465635c774 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -96,6 +96,8 @@ 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);
 
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 1cb7ca68cd4e..24a99b5b7da8 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1652,13 +1652,6 @@ int proc_do_static_key(struct ctl_table *table, int write,
 }
 
 static struct ctl_table kern_table[] = {
-	{
-		.procname	= "sched_child_runs_first",
-		.data		= &sysctl_sched_child_runs_first,
-		.maxlen		= sizeof(unsigned int),
-		.mode		= 0644,
-		.proc_handler	= proc_dointvec,
-	},
 #ifdef CONFIG_SCHEDSTATS
 	{
 		.procname	= "sched_schedstats",
-- 
2.20.1


.

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 1/8] sched: Move child_runs_first sysctls to fair.c
@ 2022-02-15  5:22   ` Zhen Ni
  0 siblings, 0 replies; 17+ messages in thread
From: Zhen Ni @ 2022-02-15  5:22 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, mcgrof, keescook
  Cc: linux-kernel, linux-fsdevel, Zhen Ni

move child_runs_first sysctls to fair.c and use the new
register_sysctl_init() to register the sysctl interface.

Signed-off-by: Zhen Ni <nizhen@uniontech.com>
---
 include/linux/sched/sysctl.h |  2 --
 kernel/sched/fair.c          | 19 +++++++++++++++++++
 kernel/sched/sched.h         |  2 ++
 kernel/sysctl.c              |  7 -------
 4 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/include/linux/sched/sysctl.h b/include/linux/sched/sysctl.h
index 3f2b70f8d32c..5490ba24783a 100644
--- a/include/linux/sched/sysctl.h
+++ b/include/linux/sched/sysctl.h
@@ -14,8 +14,6 @@ extern unsigned long sysctl_hung_task_timeout_secs;
 enum { sysctl_hung_task_timeout_secs = 0 };
 #endif
 
-extern unsigned int sysctl_sched_child_runs_first;
-
 enum sched_tunable_scaling {
 	SCHED_TUNABLESCALING_NONE,
 	SCHED_TUNABLESCALING_LOG,
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 8fc35fd779f8..4ac1bfe8ca4f 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -77,6 +77,25 @@ static unsigned int sched_nr_latency = 8;
  * parent will (try to) run first.
  */
 unsigned int sysctl_sched_child_runs_first __read_mostly;
+#ifdef CONFIG_SYSCTL
+static struct ctl_table sched_child_runs_first_sysctls[] = {
+	{
+		.procname       = "sched_child_runs_first",
+		.data           = &sysctl_sched_child_runs_first,
+		.maxlen         = sizeof(unsigned int),
+		.mode           = 0644,
+		.proc_handler   = proc_dointvec,
+	},
+	{}
+};
+
+static int __init sched_child_runs_first_sysctl_init(void)
+{
+	register_sysctl_init("kernel", sched_child_runs_first_sysctls);
+	return 0;
+}
+late_initcall(sched_child_runs_first_sysctl_init);
+#endif
 
 /*
  * SCHED_OTHER wake-up granularity.
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 9b33ba9c3c42..27465635c774 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -96,6 +96,8 @@ 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);
 
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 1cb7ca68cd4e..24a99b5b7da8 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1652,13 +1652,6 @@ int proc_do_static_key(struct ctl_table *table, int write,
 }
 
 static struct ctl_table kern_table[] = {
-	{
-		.procname	= "sched_child_runs_first",
-		.data		= &sysctl_sched_child_runs_first,
-		.maxlen		= sizeof(unsigned int),
-		.mode		= 0644,
-		.proc_handler	= proc_dointvec,
-	},
 #ifdef CONFIG_SCHEDSTATS
 	{
 		.procname	= "sched_schedstats",
-- 
2.20.1




^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/8] sched: Move schedstats sysctls to core.c
  2022-02-15  5:22 [PATCH 0/8] sched: Move a series of sysctls starting with sys/kernel/sched_* Zhen Ni
  2022-02-15  5:22   ` Zhen Ni
@ 2022-02-15  5:22 ` Zhen Ni
  2022-02-15  5:22 ` [PATCH 3/8] sched: Move rt_period/runtime sysctls to rt.c Zhen Ni
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Zhen Ni @ 2022-02-15  5:22 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, mcgrof, keescook
  Cc: linux-kernel, linux-fsdevel, Zhen Ni

move schedstats sysctls to core.c and use the new
register_sysctl_init() to register the sysctl interface.

Signed-off-by: Zhen Ni <nizhen@uniontech.com>
---
 include/linux/sched/sysctl.h |  2 --
 kernel/sched/core.c          | 22 +++++++++++++++++++++-
 kernel/sysctl.c              | 11 -----------
 3 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/include/linux/sched/sysctl.h b/include/linux/sched/sysctl.h
index 5490ba24783a..ffe42509a595 100644
--- a/include/linux/sched/sysctl.h
+++ b/include/linux/sched/sysctl.h
@@ -54,8 +54,6 @@ int sysctl_sched_uclamp_handler(struct ctl_table *table, int write,
 		void *buffer, size_t *lenp, loff_t *ppos);
 int sysctl_numa_balancing(struct ctl_table *table, int write, void *buffer,
 		size_t *lenp, loff_t *ppos);
-int sysctl_schedstats(struct ctl_table *table, int write, void *buffer,
-		size_t *lenp, loff_t *ppos);
 
 #if defined(CONFIG_ENERGY_MODEL) && defined(CONFIG_CPU_FREQ_GOV_SCHEDUTIL)
 extern unsigned int sysctl_sched_energy_aware;
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 0bf0dc3adf57..3c1239c61b45 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4354,7 +4354,7 @@ static int __init setup_schedstats(char *str)
 __setup("schedstats=", setup_schedstats);
 
 #ifdef CONFIG_PROC_SYSCTL
-int sysctl_schedstats(struct ctl_table *table, int write, void *buffer,
+static int sysctl_schedstats(struct ctl_table *table, int write, void *buffer,
 		size_t *lenp, loff_t *ppos)
 {
 	struct ctl_table t;
@@ -4373,6 +4373,26 @@ int sysctl_schedstats(struct ctl_table *table, int write, void *buffer,
 		set_schedstats(state);
 	return err;
 }
+
+static struct ctl_table sched_schedstats_sysctls[] = {
+	{
+		.procname       = "sched_schedstats",
+		.data           = NULL,
+		.maxlen         = sizeof(unsigned int),
+		.mode           = 0644,
+		.proc_handler   = sysctl_schedstats,
+		.extra1         = SYSCTL_ZERO,
+		.extra2         = SYSCTL_ONE,
+	},
+	{}
+};
+
+static int __init sched_schedstats_sysctl_init(void)
+{
+	register_sysctl_init("kernel", sched_schedstats_sysctls);
+	return 0;
+}
+late_initcall(sched_schedstats_sysctl_init);
 #endif /* CONFIG_PROC_SYSCTL */
 #endif /* CONFIG_SCHEDSTATS */
 
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 24a99b5b7da8..88ff6b27f8ab 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1652,17 +1652,6 @@ int proc_do_static_key(struct ctl_table *table, int write,
 }
 
 static struct ctl_table kern_table[] = {
-#ifdef CONFIG_SCHEDSTATS
-	{
-		.procname	= "sched_schedstats",
-		.data		= NULL,
-		.maxlen		= sizeof(unsigned int),
-		.mode		= 0644,
-		.proc_handler	= sysctl_schedstats,
-		.extra1		= SYSCTL_ZERO,
-		.extra2		= SYSCTL_ONE,
-	},
-#endif /* CONFIG_SCHEDSTATS */
 #ifdef CONFIG_TASK_DELAY_ACCT
 	{
 		.procname	= "task_delayacct",
-- 
2.20.1




^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 3/8] sched: Move rt_period/runtime sysctls to rt.c
  2022-02-15  5:22 [PATCH 0/8] sched: Move a series of sysctls starting with sys/kernel/sched_* Zhen Ni
  2022-02-15  5:22   ` Zhen Ni
  2022-02-15  5:22 ` [PATCH 2/8] sched: Move schedstats sysctls to core.c Zhen Ni
@ 2022-02-15  5:22 ` Zhen Ni
  2022-02-15  7:47     ` kernel test robot
  2022-02-15 11:23     ` kernel test robot
  2022-02-15  5:22 ` [PATCH 4/8] sched: Move deadline_period sysctls to deadline.c Zhen Ni
                   ` (5 subsequent siblings)
  8 siblings, 2 replies; 17+ messages in thread
From: Zhen Ni @ 2022-02-15  5:22 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, mcgrof, keescook
  Cc: linux-kernel, linux-fsdevel, Zhen Ni

move rt_period/runtime sysctls to rt.c and use the new
register_sysctl_init() to register the sysctl interface.

Signed-off-by: Zhen Ni <nizhen@uniontech.com>
---
 include/linux/sched/sysctl.h | 11 ---------
 kernel/sched/core.c          | 13 -----------
 kernel/sched/rt.c            | 43 +++++++++++++++++++++++++++++++++++-
 kernel/sched/sched.h         |  4 ++++
 kernel/sysctl.c              | 14 ------------
 5 files changed, 46 insertions(+), 39 deletions(-)

diff --git a/include/linux/sched/sysctl.h b/include/linux/sched/sysctl.h
index ffe42509a595..99fbf61464ab 100644
--- a/include/linux/sched/sysctl.h
+++ b/include/linux/sched/sysctl.h
@@ -21,15 +21,6 @@ enum sched_tunable_scaling {
 	SCHED_TUNABLESCALING_END,
 };
 
-/*
- *  control realtime throttling:
- *
- *  /proc/sys/kernel/sched_rt_period_us
- *  /proc/sys/kernel/sched_rt_runtime_us
- */
-extern unsigned int sysctl_sched_rt_period;
-extern int sysctl_sched_rt_runtime;
-
 extern unsigned int sysctl_sched_dl_period_max;
 extern unsigned int sysctl_sched_dl_period_min;
 
@@ -48,8 +39,6 @@ extern int sched_rr_timeslice;
 
 int sched_rr_handler(struct ctl_table *table, int write, void *buffer,
 		size_t *lenp, loff_t *ppos);
-int sched_rt_handler(struct ctl_table *table, int write, void *buffer,
-		size_t *lenp, loff_t *ppos);
 int sysctl_sched_uclamp_handler(struct ctl_table *table, int write,
 		void *buffer, size_t *lenp, loff_t *ppos);
 int sysctl_numa_balancing(struct ctl_table *table, int write, void *buffer,
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 3c1239c61b45..276033cceaf2 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -81,12 +81,6 @@ const_debug unsigned int sysctl_sched_nr_migrate = 8;
 const_debug unsigned int sysctl_sched_nr_migrate = 32;
 #endif
 
-/*
- * period over which we measure -rt task CPU usage in us.
- * default: 1s
- */
-unsigned int sysctl_sched_rt_period = 1000000;
-
 __read_mostly int scheduler_running;
 
 #ifdef CONFIG_SCHED_CORE
@@ -380,13 +374,6 @@ sched_core_dequeue(struct rq *rq, struct task_struct *p, int flags) { }
 
 #endif /* CONFIG_SCHED_CORE */
 
-/*
- * part of the period that we allow rt tasks to run in us.
- * default: 0.95s
- */
-int sysctl_sched_rt_runtime = 950000;
-
-
 /*
  * Serialization rules:
  *
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 7b4f4fbbb404..1106828c4236 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -16,6 +16,47 @@ static int do_sched_rt_period_timer(struct rt_bandwidth *rt_b, int overrun);
 
 struct rt_bandwidth def_rt_bandwidth;
 
+/*
+ * period over which we measure -rt task CPU usage in us.
+ * default: 1s
+ */
+unsigned int sysctl_sched_rt_period = 1000000;
+
+/*
+ * part of the period that we allow rt tasks to run in us.
+ * default: 0.95s
+ */
+int sysctl_sched_rt_runtime = 950000;
+
+static int sched_rt_handler(struct ctl_table *table, int write, void *buffer,
+		size_t *lenp, loff_t *ppos);
+#ifdef CONFIG_SYSCTL
+static struct ctl_table sched_rt_sysctls[] = {
+	{
+		.procname       = "sched_rt_period_us",
+		.data           = &sysctl_sched_rt_period,
+		.maxlen         = sizeof(unsigned int),
+		.mode           = 0644,
+		.proc_handler   = sched_rt_handler,
+	},
+	{
+		.procname       = "sched_rt_runtime_us",
+		.data           = &sysctl_sched_rt_runtime,
+		.maxlen         = sizeof(int),
+		.mode           = 0644,
+		.proc_handler   = sched_rt_handler,
+	},
+	{}
+};
+
+static int __init sched_rt_sysctl_init(void)
+{
+	register_sysctl_init("kernel", sched_rt_sysctls);
+	return 0;
+}
+late_initcall(sched_rt_sysctl_init);
+#endif
+
 static enum hrtimer_restart sched_rt_period_timer(struct hrtimer *timer)
 {
 	struct rt_bandwidth *rt_b =
@@ -2928,7 +2969,7 @@ static void sched_rt_do_global(void)
 	raw_spin_unlock_irqrestore(&def_rt_bandwidth.rt_runtime_lock, flags);
 }
 
-int sched_rt_handler(struct ctl_table *table, int write, void *buffer,
+static int sched_rt_handler(struct ctl_table *table, int write, void *buffer,
 		size_t *lenp, loff_t *ppos)
 {
 	int old_period, old_runtime;
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 27465635c774..385e74095434 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -102,6 +102,10 @@ extern void calc_global_load_tick(struct rq *this_rq);
 extern long calc_load_fold_active(struct rq *this_rq, long adjust);
 
 extern void call_trace_sched_update_nr_running(struct rq *rq, int count);
+
+extern unsigned int sysctl_sched_rt_period;
+extern int sysctl_sched_rt_runtime;
+
 /*
  * Helpers for converting nanosecond timing to jiffy resolution
  */
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 88ff6b27f8ab..73cccd935d65 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1674,20 +1674,6 @@ static struct ctl_table kern_table[] = {
 		.extra2		= SYSCTL_ONE,
 	},
 #endif /* CONFIG_NUMA_BALANCING */
-	{
-		.procname	= "sched_rt_period_us",
-		.data		= &sysctl_sched_rt_period,
-		.maxlen		= sizeof(unsigned int),
-		.mode		= 0644,
-		.proc_handler	= sched_rt_handler,
-	},
-	{
-		.procname	= "sched_rt_runtime_us",
-		.data		= &sysctl_sched_rt_runtime,
-		.maxlen		= sizeof(int),
-		.mode		= 0644,
-		.proc_handler	= sched_rt_handler,
-	},
 	{
 		.procname	= "sched_deadline_period_max_us",
 		.data		= &sysctl_sched_dl_period_max,
-- 
2.20.1




^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 4/8] sched: Move deadline_period sysctls to deadline.c
  2022-02-15  5:22 [PATCH 0/8] sched: Move a series of sysctls starting with sys/kernel/sched_* Zhen Ni
                   ` (2 preceding siblings ...)
  2022-02-15  5:22 ` [PATCH 3/8] sched: Move rt_period/runtime sysctls to rt.c Zhen Ni
@ 2022-02-15  5:22 ` Zhen Ni
  2022-02-15  5:22 ` [PATCH 5/8] sched: Move rr_timeslice sysctls to rt.c Zhen Ni
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Zhen Ni @ 2022-02-15  5:22 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, mcgrof, keescook
  Cc: linux-kernel, linux-fsdevel, Zhen Ni

move deadline_period sysctls to deadline.c and use the new
register_sysctl_init() to register the sysctl interface.

Signed-off-by: Zhen Ni <nizhen@uniontech.com>
---
 include/linux/sched/sysctl.h |  3 ---
 kernel/sched/deadline.c      | 42 +++++++++++++++++++++++++++++-------
 kernel/sysctl.c              | 14 ------------
 3 files changed, 34 insertions(+), 25 deletions(-)

diff --git a/include/linux/sched/sysctl.h b/include/linux/sched/sysctl.h
index 99fbf61464ab..81187a8c625d 100644
--- a/include/linux/sched/sysctl.h
+++ b/include/linux/sched/sysctl.h
@@ -21,9 +21,6 @@ enum sched_tunable_scaling {
 	SCHED_TUNABLESCALING_END,
 };
 
-extern unsigned int sysctl_sched_dl_period_max;
-extern unsigned int sysctl_sched_dl_period_min;
-
 #ifdef CONFIG_UCLAMP_TASK
 extern unsigned int sysctl_sched_uclamp_util_min;
 extern unsigned int sysctl_sched_uclamp_util_max;
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index d2c072b0ef01..9ed9ace11151 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -20,6 +20,40 @@
 
 struct dl_bandwidth def_dl_bandwidth;
 
+/*
+ * Default limits for DL period; on the top end we guard against small util
+ * tasks still getting ridiculously long effective runtimes, on the bottom end we
+ * guard against timer DoS.
+ */
+static unsigned int sysctl_sched_dl_period_max = 1 << 22; /* ~4 seconds */
+static unsigned int sysctl_sched_dl_period_min = 100;     /* 100 us */
+#ifdef CONFIG_SYSCTL
+static struct ctl_table sched_dl_sysctls[] = {
+	{
+		.procname       = "sched_deadline_period_max_us",
+		.data           = &sysctl_sched_dl_period_max,
+		.maxlen         = sizeof(unsigned int),
+		.mode           = 0644,
+		.proc_handler   = proc_dointvec,
+	},
+	{
+		.procname       = "sched_deadline_period_min_us",
+		.data           = &sysctl_sched_dl_period_min,
+		.maxlen         = sizeof(unsigned int),
+		.mode           = 0644,
+		.proc_handler   = proc_dointvec,
+	},
+	{}
+};
+
+static int __init sched_dl_sysctl_init(void)
+{
+	register_sysctl_init("kernel", sched_dl_sysctls);
+	return 0;
+}
+late_initcall(sched_dl_sysctl_init);
+#endif
+
 static inline struct task_struct *dl_task_of(struct sched_dl_entity *dl_se)
 {
 	return container_of(dl_se, struct task_struct, dl);
@@ -2854,14 +2888,6 @@ void __getparam_dl(struct task_struct *p, struct sched_attr *attr)
 	attr->sched_flags |= dl_se->flags;
 }
 
-/*
- * Default limits for DL period; on the top end we guard against small util
- * tasks still getting ridiculously long effective runtimes, on the bottom end we
- * guard against timer DoS.
- */
-unsigned int sysctl_sched_dl_period_max = 1 << 22; /* ~4 seconds */
-unsigned int sysctl_sched_dl_period_min = 100;     /* 100 us */
-
 /*
  * This function validates the new parameters of a -deadline task.
  * We ask for the deadline not being zero, and greater or equal
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 73cccd935d65..f4434d22246b 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1674,20 +1674,6 @@ static struct ctl_table kern_table[] = {
 		.extra2		= SYSCTL_ONE,
 	},
 #endif /* CONFIG_NUMA_BALANCING */
-	{
-		.procname	= "sched_deadline_period_max_us",
-		.data		= &sysctl_sched_dl_period_max,
-		.maxlen		= sizeof(unsigned int),
-		.mode		= 0644,
-		.proc_handler	= proc_dointvec,
-	},
-	{
-		.procname	= "sched_deadline_period_min_us",
-		.data		= &sysctl_sched_dl_period_min,
-		.maxlen		= sizeof(unsigned int),
-		.mode		= 0644,
-		.proc_handler	= proc_dointvec,
-	},
 	{
 		.procname	= "sched_rr_timeslice_ms",
 		.data		= &sysctl_sched_rr_timeslice,
-- 
2.20.1




^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 5/8] sched: Move rr_timeslice sysctls to rt.c
  2022-02-15  5:22 [PATCH 0/8] sched: Move a series of sysctls starting with sys/kernel/sched_* Zhen Ni
                   ` (3 preceding siblings ...)
  2022-02-15  5:22 ` [PATCH 4/8] sched: Move deadline_period sysctls to deadline.c Zhen Ni
@ 2022-02-15  5:22 ` Zhen Ni
  2022-02-15  5:22 ` [PATCH 6/8] sched: Move uclamp_util sysctls to core.c Zhen Ni
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Zhen Ni @ 2022-02-15  5:22 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, mcgrof, keescook
  Cc: linux-kernel, linux-fsdevel, Zhen Ni

move rr_timeslice sysctls to rt.c and use the new
register_sysctl_init() to register the sysctl interface.

Signed-off-by: Zhen Ni <nizhen@uniontech.com>
---
 include/linux/sched/sysctl.h |  5 -----
 kernel/sched/rt.c            | 13 +++++++++++--
 kernel/sched/sched.h         |  1 +
 kernel/sysctl.c              |  7 -------
 4 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/include/linux/sched/sysctl.h b/include/linux/sched/sysctl.h
index 81187a8c625d..5515b54bfb57 100644
--- a/include/linux/sched/sysctl.h
+++ b/include/linux/sched/sysctl.h
@@ -31,11 +31,6 @@ extern unsigned int sysctl_sched_uclamp_util_min_rt_default;
 extern unsigned int sysctl_sched_cfs_bandwidth_slice;
 #endif
 
-extern int sysctl_sched_rr_timeslice;
-extern int sched_rr_timeslice;
-
-int sched_rr_handler(struct ctl_table *table, int write, void *buffer,
-		size_t *lenp, loff_t *ppos);
 int sysctl_sched_uclamp_handler(struct ctl_table *table, int write,
 		void *buffer, size_t *lenp, loff_t *ppos);
 int sysctl_numa_balancing(struct ctl_table *table, int write, void *buffer,
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 1106828c4236..95e4d5f31caa 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -8,7 +8,7 @@
 #include "pelt.h"
 
 int sched_rr_timeslice = RR_TIMESLICE;
-int sysctl_sched_rr_timeslice = (MSEC_PER_SEC / HZ) * RR_TIMESLICE;
+static int sysctl_sched_rr_timeslice = (MSEC_PER_SEC / HZ) * RR_TIMESLICE;
 /* More than 4 hours if BW_SHIFT equals 20. */
 static const u64 max_rt_runtime = MAX_BW;
 
@@ -30,6 +30,8 @@ int sysctl_sched_rt_runtime = 950000;
 
 static int sched_rt_handler(struct ctl_table *table, int write, void *buffer,
 		size_t *lenp, loff_t *ppos);
+static int sched_rr_handler(struct ctl_table *table, int write, void *buffer,
+		size_t *lenp, loff_t *ppos);
 #ifdef CONFIG_SYSCTL
 static struct ctl_table sched_rt_sysctls[] = {
 	{
@@ -46,6 +48,13 @@ static struct ctl_table sched_rt_sysctls[] = {
 		.mode           = 0644,
 		.proc_handler   = sched_rt_handler,
 	},
+	{
+		.procname       = "sched_rr_timeslice_ms",
+		.data           = &sysctl_sched_rr_timeslice,
+		.maxlen         = sizeof(int),
+		.mode           = 0644,
+		.proc_handler   = sched_rr_handler,
+	},
 	{}
 };
 
@@ -3008,7 +3017,7 @@ static int sched_rt_handler(struct ctl_table *table, int write, void *buffer,
 	return ret;
 }
 
-int sched_rr_handler(struct ctl_table *table, int write, void *buffer,
+static int sched_rr_handler(struct ctl_table *table, int write, void *buffer,
 		size_t *lenp, loff_t *ppos)
 {
 	int ret;
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 385e74095434..2d3451e06c55 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -105,6 +105,7 @@ extern void call_trace_sched_update_nr_running(struct rq *rq, int count);
 
 extern unsigned int sysctl_sched_rt_period;
 extern int sysctl_sched_rt_runtime;
+extern int sched_rr_timeslice;
 
 /*
  * Helpers for converting nanosecond timing to jiffy resolution
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index f4434d22246b..cfcbd17005af 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1674,13 +1674,6 @@ static struct ctl_table kern_table[] = {
 		.extra2		= SYSCTL_ONE,
 	},
 #endif /* CONFIG_NUMA_BALANCING */
-	{
-		.procname	= "sched_rr_timeslice_ms",
-		.data		= &sysctl_sched_rr_timeslice,
-		.maxlen		= sizeof(int),
-		.mode		= 0644,
-		.proc_handler	= sched_rr_handler,
-	},
 #ifdef CONFIG_UCLAMP_TASK
 	{
 		.procname	= "sched_util_clamp_min",
-- 
2.20.1




^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 6/8] sched: Move uclamp_util sysctls to core.c
  2022-02-15  5:22 [PATCH 0/8] sched: Move a series of sysctls starting with sys/kernel/sched_* Zhen Ni
                   ` (4 preceding siblings ...)
  2022-02-15  5:22 ` [PATCH 5/8] sched: Move rr_timeslice sysctls to rt.c Zhen Ni
@ 2022-02-15  5:22 ` Zhen Ni
  2022-02-15  5:22 ` [PATCH 7/8] sched: Move cfs_bandwidth_slice sysctls to fair.c Zhen Ni
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Zhen Ni @ 2022-02-15  5:22 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, mcgrof, keescook
  Cc: linux-kernel, linux-fsdevel, Zhen Ni

move uclamp_util sysctls to core.c and use the new
register_sysctl_init() to register the sysctl interface.

Signed-off-by: Zhen Ni <nizhen@uniontech.com>
---
 include/linux/sched/sysctl.h |  8 ------
 kernel/sched/core.c          | 48 +++++++++++++++++++++++++++---------
 kernel/sysctl.c              | 23 -----------------
 3 files changed, 37 insertions(+), 42 deletions(-)

diff --git a/include/linux/sched/sysctl.h b/include/linux/sched/sysctl.h
index 5515b54bfb57..9fe879602c4f 100644
--- a/include/linux/sched/sysctl.h
+++ b/include/linux/sched/sysctl.h
@@ -21,18 +21,10 @@ enum sched_tunable_scaling {
 	SCHED_TUNABLESCALING_END,
 };
 
-#ifdef CONFIG_UCLAMP_TASK
-extern unsigned int sysctl_sched_uclamp_util_min;
-extern unsigned int sysctl_sched_uclamp_util_max;
-extern unsigned int sysctl_sched_uclamp_util_min_rt_default;
-#endif
-
 #ifdef CONFIG_CFS_BANDWIDTH
 extern unsigned int sysctl_sched_cfs_bandwidth_slice;
 #endif
 
-int sysctl_sched_uclamp_handler(struct ctl_table *table, int write,
-		void *buffer, size_t *lenp, loff_t *ppos);
 int sysctl_numa_balancing(struct ctl_table *table, int write, void *buffer,
 		size_t *lenp, loff_t *ppos);
 
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 276033cceaf2..c4dab5535575 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1243,10 +1243,10 @@ static void set_load_weight(struct task_struct *p)
 static DEFINE_MUTEX(uclamp_mutex);
 
 /* Max allowed minimum utilization */
-unsigned int sysctl_sched_uclamp_util_min = SCHED_CAPACITY_SCALE;
+static unsigned int sysctl_sched_uclamp_util_min = SCHED_CAPACITY_SCALE;
 
 /* Max allowed maximum utilization */
-unsigned int sysctl_sched_uclamp_util_max = SCHED_CAPACITY_SCALE;
+static unsigned int sysctl_sched_uclamp_util_max = SCHED_CAPACITY_SCALE;
 
 /*
  * By default RT tasks run at the maximum performance point/capacity of the
@@ -1263,7 +1263,7 @@ unsigned int sysctl_sched_uclamp_util_max = SCHED_CAPACITY_SCALE;
  * This knob will not override the system default sched_util_clamp_min defined
  * above.
  */
-unsigned int sysctl_sched_uclamp_util_min_rt_default = SCHED_CAPACITY_SCALE;
+static unsigned int sysctl_sched_uclamp_util_min_rt_default = SCHED_CAPACITY_SCALE;
 
 /* All clamps are required to be less or equal than these values */
 static struct uclamp_se uclamp_default[UCLAMP_CNT];
@@ -1716,7 +1716,7 @@ static void uclamp_update_root_tg(void)
 static void uclamp_update_root_tg(void) { }
 #endif
 
-int sysctl_sched_uclamp_handler(struct ctl_table *table, int write,
+static int sysctl_sched_uclamp_handler(struct ctl_table *table, int write,
 				void *buffer, size_t *lenp, loff_t *ppos)
 {
 	bool update_root_tg = false;
@@ -4360,8 +4360,12 @@ static int sysctl_schedstats(struct ctl_table *table, int write, void *buffer,
 		set_schedstats(state);
 	return err;
 }
+#endif /* CONFIG_PROC_SYSCTL */
+#endif /* CONFIG_SCHEDSTATS */
 
-static struct ctl_table sched_schedstats_sysctls[] = {
+#ifdef CONFIG_SYSCTL
+static struct ctl_table sched_core_sysctls[] = {
+#ifdef CONFIG_SCHEDSTATS
 	{
 		.procname       = "sched_schedstats",
 		.data           = NULL,
@@ -4371,17 +4375,39 @@ static struct ctl_table sched_schedstats_sysctls[] = {
 		.extra1         = SYSCTL_ZERO,
 		.extra2         = SYSCTL_ONE,
 	},
+#endif /* CONFIG_SCHEDSTATS */
+#ifdef CONFIG_UCLAMP_TASK
+	{
+		.procname       = "sched_util_clamp_min",
+		.data           = &sysctl_sched_uclamp_util_min,
+		.maxlen         = sizeof(unsigned int),
+		.mode           = 0644,
+		.proc_handler   = sysctl_sched_uclamp_handler,
+	},
+	{
+		.procname       = "sched_util_clamp_max",
+		.data           = &sysctl_sched_uclamp_util_max,
+		.maxlen         = sizeof(unsigned int),
+		.mode           = 0644,
+		.proc_handler   = sysctl_sched_uclamp_handler,
+	},
+	{
+		.procname       = "sched_util_clamp_min_rt_default",
+		.data           = &sysctl_sched_uclamp_util_min_rt_default,
+		.maxlen         = sizeof(unsigned int),
+		.mode           = 0644,
+		.proc_handler   = sysctl_sched_uclamp_handler,
+	},
+#endif /* CONFIG_UCLAMP_TASK */
 	{}
 };
-
-static int __init sched_schedstats_sysctl_init(void)
+static int __init sched_core_sysctl_init(void)
 {
-	register_sysctl_init("kernel", sched_schedstats_sysctls);
+	register_sysctl_init("kernel", sched_core_sysctls);
 	return 0;
 }
-late_initcall(sched_schedstats_sysctl_init);
-#endif /* CONFIG_PROC_SYSCTL */
-#endif /* CONFIG_SCHEDSTATS */
+late_initcall(sched_core_sysctl_init);
+#endif /* CONFIG_SYSCTL */
 
 /*
  * fork()/clone()-time setup:
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index cfcbd17005af..d811e471f7d3 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1674,29 +1674,6 @@ static struct ctl_table kern_table[] = {
 		.extra2		= SYSCTL_ONE,
 	},
 #endif /* CONFIG_NUMA_BALANCING */
-#ifdef CONFIG_UCLAMP_TASK
-	{
-		.procname	= "sched_util_clamp_min",
-		.data		= &sysctl_sched_uclamp_util_min,
-		.maxlen		= sizeof(unsigned int),
-		.mode		= 0644,
-		.proc_handler	= sysctl_sched_uclamp_handler,
-	},
-	{
-		.procname	= "sched_util_clamp_max",
-		.data		= &sysctl_sched_uclamp_util_max,
-		.maxlen		= sizeof(unsigned int),
-		.mode		= 0644,
-		.proc_handler	= sysctl_sched_uclamp_handler,
-	},
-	{
-		.procname	= "sched_util_clamp_min_rt_default",
-		.data		= &sysctl_sched_uclamp_util_min_rt_default,
-		.maxlen		= sizeof(unsigned int),
-		.mode		= 0644,
-		.proc_handler	= sysctl_sched_uclamp_handler,
-	},
-#endif
 #ifdef CONFIG_CFS_BANDWIDTH
 	{
 		.procname	= "sched_cfs_bandwidth_slice_us",
-- 
2.20.1




^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 7/8] sched: Move cfs_bandwidth_slice sysctls to fair.c
  2022-02-15  5:22 [PATCH 0/8] sched: Move a series of sysctls starting with sys/kernel/sched_* Zhen Ni
                   ` (5 preceding siblings ...)
  2022-02-15  5:22 ` [PATCH 6/8] sched: Move uclamp_util sysctls to core.c Zhen Ni
@ 2022-02-15  5:22 ` Zhen Ni
  2022-02-15  5:22 ` [PATCH 8/8] sched: Move energy_aware sysctls to topology.c Zhen Ni
  2022-02-15  6:01 ` [PATCH 0/8] sched: Move a series of sysctls starting with sys/kernel/sched_* Chaitanya Kulkarni
  8 siblings, 0 replies; 17+ messages in thread
From: Zhen Ni @ 2022-02-15  5:22 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, mcgrof, keescook
  Cc: linux-kernel, linux-fsdevel, Zhen Ni

move cfs_bandwidth_slice sysctls to fair.c and use the
new register_sysctl_init() to register the sysctl interface.

Signed-off-by: Zhen Ni <nizhen@uniontech.com>
---
 include/linux/sched/sysctl.h |  4 ---
 kernel/sched/fair.c          | 51 ++++++++++++++++++++++--------------
 kernel/sysctl.c              | 10 -------
 3 files changed, 31 insertions(+), 34 deletions(-)

diff --git a/include/linux/sched/sysctl.h b/include/linux/sched/sysctl.h
index 9fe879602c4f..053688eafd51 100644
--- a/include/linux/sched/sysctl.h
+++ b/include/linux/sched/sysctl.h
@@ -21,10 +21,6 @@ enum sched_tunable_scaling {
 	SCHED_TUNABLESCALING_END,
 };
 
-#ifdef CONFIG_CFS_BANDWIDTH
-extern unsigned int sysctl_sched_cfs_bandwidth_slice;
-#endif
-
 int sysctl_numa_balancing(struct ctl_table *table, int write, void *buffer,
 		size_t *lenp, loff_t *ppos);
 
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 4ac1bfe8ca4f..321ddda16909 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -77,25 +77,6 @@ static unsigned int sched_nr_latency = 8;
  * parent will (try to) run first.
  */
 unsigned int sysctl_sched_child_runs_first __read_mostly;
-#ifdef CONFIG_SYSCTL
-static struct ctl_table sched_child_runs_first_sysctls[] = {
-	{
-		.procname       = "sched_child_runs_first",
-		.data           = &sysctl_sched_child_runs_first,
-		.maxlen         = sizeof(unsigned int),
-		.mode           = 0644,
-		.proc_handler   = proc_dointvec,
-	},
-	{}
-};
-
-static int __init sched_child_runs_first_sysctl_init(void)
-{
-	register_sysctl_init("kernel", sched_child_runs_first_sysctls);
-	return 0;
-}
-late_initcall(sched_child_runs_first_sysctl_init);
-#endif
 
 /*
  * SCHED_OTHER wake-up granularity.
@@ -160,7 +141,37 @@ int __weak arch_asym_cpu_priority(int cpu)
  *
  * (default: 5 msec, units: microseconds)
  */
-unsigned int sysctl_sched_cfs_bandwidth_slice		= 5000UL;
+static unsigned int sysctl_sched_cfs_bandwidth_slice		= 5000UL;
+#endif
+
+#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",
+		.data           = &sysctl_sched_cfs_bandwidth_slice,
+		.maxlen         = sizeof(unsigned int),
+		.mode           = 0644,
+		.proc_handler   = proc_dointvec_minmax,
+		.extra1         = SYSCTL_ONE,
+	},
+#endif
+	{}
+};
+
+static int __init sched_fair_sysctl_init(void)
+{
+	register_sysctl_init("kernel", sched_fair_sysctls);
+	return 0;
+}
+late_initcall(sched_fair_sysctl_init);
 #endif
 
 static inline void update_load_add(struct load_weight *lw, unsigned long inc)
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index d811e471f7d3..21b797906cc4 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1674,16 +1674,6 @@ static struct ctl_table kern_table[] = {
 		.extra2		= SYSCTL_ONE,
 	},
 #endif /* CONFIG_NUMA_BALANCING */
-#ifdef CONFIG_CFS_BANDWIDTH
-	{
-		.procname	= "sched_cfs_bandwidth_slice_us",
-		.data		= &sysctl_sched_cfs_bandwidth_slice,
-		.maxlen		= sizeof(unsigned int),
-		.mode		= 0644,
-		.proc_handler	= proc_dointvec_minmax,
-		.extra1		= SYSCTL_ONE,
-	},
-#endif
 #if defined(CONFIG_ENERGY_MODEL) && defined(CONFIG_CPU_FREQ_GOV_SCHEDUTIL)
 	{
 		.procname	= "sched_energy_aware",
-- 
2.20.1




^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 8/8] sched: Move energy_aware sysctls to topology.c
  2022-02-15  5:22 [PATCH 0/8] sched: Move a series of sysctls starting with sys/kernel/sched_* Zhen Ni
                   ` (6 preceding siblings ...)
  2022-02-15  5:22 ` [PATCH 7/8] sched: Move cfs_bandwidth_slice sysctls to fair.c Zhen Ni
@ 2022-02-15  5:22 ` Zhen Ni
  2022-02-15  6:01 ` [PATCH 0/8] sched: Move a series of sysctls starting with sys/kernel/sched_* Chaitanya Kulkarni
  8 siblings, 0 replies; 17+ messages in thread
From: Zhen Ni @ 2022-02-15  5:22 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, mcgrof, keescook
  Cc: linux-kernel, linux-fsdevel, Zhen Ni

move energy_aware sysctls to topology.c and use the new
register_sysctl_init() to register the sysctl interface.

Signed-off-by: Zhen Ni <nizhen@uniontech.com>
---
 include/linux/sched/sysctl.h |  6 ------
 kernel/sched/topology.c      | 25 +++++++++++++++++++++++--
 kernel/sysctl.c              | 11 -----------
 3 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/include/linux/sched/sysctl.h b/include/linux/sched/sysctl.h
index 053688eafd51..b6a4063e388d 100644
--- a/include/linux/sched/sysctl.h
+++ b/include/linux/sched/sysctl.h
@@ -24,10 +24,4 @@ enum sched_tunable_scaling {
 int sysctl_numa_balancing(struct ctl_table *table, int write, void *buffer,
 		size_t *lenp, loff_t *ppos);
 
-#if defined(CONFIG_ENERGY_MODEL) && defined(CONFIG_CPU_FREQ_GOV_SCHEDUTIL)
-extern unsigned int sysctl_sched_energy_aware;
-int sched_energy_aware_handler(struct ctl_table *table, int write,
-		void *buffer, size_t *lenp, loff_t *ppos);
-#endif
-
 #endif /* _LINUX_SCHED_SYSCTL_H */
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index d201a7052a29..409e27af2034 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -207,7 +207,7 @@ sd_parent_degenerate(struct sched_domain *sd, struct sched_domain *parent)
 
 #if defined(CONFIG_ENERGY_MODEL) && defined(CONFIG_CPU_FREQ_GOV_SCHEDUTIL)
 DEFINE_STATIC_KEY_FALSE(sched_energy_present);
-unsigned int sysctl_sched_energy_aware = 1;
+static unsigned int sysctl_sched_energy_aware = 1;
 DEFINE_MUTEX(sched_energy_mutex);
 bool sched_energy_update;
 
@@ -221,7 +221,7 @@ void rebuild_sched_domains_energy(void)
 }
 
 #ifdef CONFIG_PROC_SYSCTL
-int sched_energy_aware_handler(struct ctl_table *table, int write,
+static int sched_energy_aware_handler(struct ctl_table *table, int write,
 		void *buffer, size_t *lenp, loff_t *ppos)
 {
 	int ret, state;
@@ -238,6 +238,27 @@ int sched_energy_aware_handler(struct ctl_table *table, int write,
 
 	return ret;
 }
+
+static struct ctl_table sched_energy_aware_sysctls[] = {
+	{
+		.procname       = "sched_energy_aware",
+		.data           = &sysctl_sched_energy_aware,
+		.maxlen         = sizeof(unsigned int),
+		.mode           = 0644,
+		.proc_handler   = sched_energy_aware_handler,
+		.extra1         = SYSCTL_ZERO,
+		.extra2         = SYSCTL_ONE,
+	},
+	{}
+};
+
+static int __init sched_energy_aware_sysctl_init(void)
+{
+	register_sysctl_init("kernel", sched_energy_aware_sysctls);
+	return 0;
+}
+
+late_initcall(sched_energy_aware_sysctl_init);
 #endif
 
 static void free_pd(struct perf_domain *pd)
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 21b797906cc4..ee6701ea73ea 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1674,17 +1674,6 @@ static struct ctl_table kern_table[] = {
 		.extra2		= SYSCTL_ONE,
 	},
 #endif /* CONFIG_NUMA_BALANCING */
-#if defined(CONFIG_ENERGY_MODEL) && defined(CONFIG_CPU_FREQ_GOV_SCHEDUTIL)
-	{
-		.procname	= "sched_energy_aware",
-		.data		= &sysctl_sched_energy_aware,
-		.maxlen		= sizeof(unsigned int),
-		.mode		= 0644,
-		.proc_handler	= sched_energy_aware_handler,
-		.extra1		= SYSCTL_ZERO,
-		.extra2		= SYSCTL_ONE,
-	},
-#endif
 #ifdef CONFIG_PROVE_LOCKING
 	{
 		.procname	= "prove_locking",
-- 
2.20.1




^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/8] sched: Move a series of sysctls starting with sys/kernel/sched_*
  2022-02-15  5:22 [PATCH 0/8] sched: Move a series of sysctls starting with sys/kernel/sched_* Zhen Ni
                   ` (7 preceding siblings ...)
  2022-02-15  5:22 ` [PATCH 8/8] sched: Move energy_aware sysctls to topology.c Zhen Ni
@ 2022-02-15  6:01 ` Chaitanya Kulkarni
  8 siblings, 0 replies; 17+ messages in thread
From: Chaitanya Kulkarni @ 2022-02-15  6:01 UTC (permalink / raw)
  To: Zhen Ni
  Cc: linux-kernel, mingo, peterz, linux-fsdevel, keescook, mcgrof,
	vincent.guittot, juri.lelli

On 2/14/22 21:22, Zhen Ni wrote:
> *** BLURB HERE ***
> 

empty Cover-letter ?

-ck



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 3/8] sched: Move rt_period/runtime sysctls to rt.c
  2022-02-15  5:22 ` [PATCH 3/8] sched: Move rt_period/runtime sysctls to rt.c Zhen Ni
@ 2022-02-15  7:47     ` kernel test robot
  2022-02-15 11:23     ` kernel test robot
  1 sibling, 0 replies; 17+ messages in thread
From: kernel test robot @ 2022-02-15  7:47 UTC (permalink / raw)
  To: Zhen Ni, mingo, peterz, juri.lelli, vincent.guittot, mcgrof, keescook
  Cc: kbuild-all, linux-kernel, linux-fsdevel, Zhen Ni

Hi Zhen,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on tip/sched/core]
[also build test ERROR on linus/master kees/for-next/pstore v5.17-rc4]
[cannot apply to next-20220214]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Zhen-Ni/sched-Move-a-series-of-sysctls-starting-with-sys-kernel-sched_/20220215-132416
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 3624ba7b5e2acc02b01301ea5fd3534971eb9896
config: parisc-randconfig-r023-20220214 (https://download.01.org/0day-ci/archive/20220215/202202151509.TszSxsaB-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/f93266963b3b3629980fa3384a5e37fd13f4c350
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Zhen-Ni/sched-Move-a-series-of-sysctls-starting-with-sys-kernel-sched_/20220215-132416
        git checkout f93266963b3b3629980fa3384a5e37fd13f4c350
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=parisc SHELL=/bin/bash kernel/rcu/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   kernel/rcu/rcutorture.c: In function 'rcu_torture_disable_rt_throttle':
>> kernel/rcu/rcutorture.c:921:26: error: 'sysctl_sched_rt_runtime' undeclared (first use in this function); did you mean 'sysctl_sched_rr_timeslice'?
     921 |         old_rt_runtime = sysctl_sched_rt_runtime;
         |                          ^~~~~~~~~~~~~~~~~~~~~~~
         |                          sysctl_sched_rr_timeslice
   kernel/rcu/rcutorture.c:921:26: note: each undeclared identifier is reported only once for each function it appears in
   kernel/rcu/rcutorture.c: In function 'rcu_torture_enable_rt_throttle':
   kernel/rcu/rcutorture.c:930:9: error: 'sysctl_sched_rt_runtime' undeclared (first use in this function); did you mean 'sysctl_sched_rr_timeslice'?
     930 |         sysctl_sched_rt_runtime = old_rt_runtime;
         |         ^~~~~~~~~~~~~~~~~~~~~~~
         |         sysctl_sched_rr_timeslice


vim +921 kernel/rcu/rcutorture.c

450efca7182a51 Joel Fernandes (Google  2018-06-10  909) 
450efca7182a51 Joel Fernandes (Google  2018-06-10  910) static void rcu_torture_disable_rt_throttle(void)
450efca7182a51 Joel Fernandes (Google  2018-06-10  911) {
450efca7182a51 Joel Fernandes (Google  2018-06-10  912) 	/*
450efca7182a51 Joel Fernandes (Google  2018-06-10  913) 	 * Disable RT throttling so that rcutorture's boost threads don't get
450efca7182a51 Joel Fernandes (Google  2018-06-10  914) 	 * throttled. Only possible if rcutorture is built-in otherwise the
450efca7182a51 Joel Fernandes (Google  2018-06-10  915) 	 * user should manually do this by setting the sched_rt_period_us and
450efca7182a51 Joel Fernandes (Google  2018-06-10  916) 	 * sched_rt_runtime sysctls.
450efca7182a51 Joel Fernandes (Google  2018-06-10  917) 	 */
450efca7182a51 Joel Fernandes (Google  2018-06-10  918) 	if (!IS_BUILTIN(CONFIG_RCU_TORTURE_TEST) || old_rt_runtime != -1)
450efca7182a51 Joel Fernandes (Google  2018-06-10  919) 		return;
450efca7182a51 Joel Fernandes (Google  2018-06-10  920) 
450efca7182a51 Joel Fernandes (Google  2018-06-10 @921) 	old_rt_runtime = sysctl_sched_rt_runtime;
450efca7182a51 Joel Fernandes (Google  2018-06-10  922) 	sysctl_sched_rt_runtime = -1;
450efca7182a51 Joel Fernandes (Google  2018-06-10  923) }
450efca7182a51 Joel Fernandes (Google  2018-06-10  924) 

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 3/8] sched: Move rt_period/runtime sysctls to rt.c
@ 2022-02-15  7:47     ` kernel test robot
  0 siblings, 0 replies; 17+ messages in thread
From: kernel test robot @ 2022-02-15  7:47 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4159 bytes --]

Hi Zhen,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on tip/sched/core]
[also build test ERROR on linus/master kees/for-next/pstore v5.17-rc4]
[cannot apply to next-20220214]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Zhen-Ni/sched-Move-a-series-of-sysctls-starting-with-sys-kernel-sched_/20220215-132416
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 3624ba7b5e2acc02b01301ea5fd3534971eb9896
config: parisc-randconfig-r023-20220214 (https://download.01.org/0day-ci/archive/20220215/202202151509.TszSxsaB-lkp(a)intel.com/config)
compiler: hppa-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/f93266963b3b3629980fa3384a5e37fd13f4c350
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Zhen-Ni/sched-Move-a-series-of-sysctls-starting-with-sys-kernel-sched_/20220215-132416
        git checkout f93266963b3b3629980fa3384a5e37fd13f4c350
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=parisc SHELL=/bin/bash kernel/rcu/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   kernel/rcu/rcutorture.c: In function 'rcu_torture_disable_rt_throttle':
>> kernel/rcu/rcutorture.c:921:26: error: 'sysctl_sched_rt_runtime' undeclared (first use in this function); did you mean 'sysctl_sched_rr_timeslice'?
     921 |         old_rt_runtime = sysctl_sched_rt_runtime;
         |                          ^~~~~~~~~~~~~~~~~~~~~~~
         |                          sysctl_sched_rr_timeslice
   kernel/rcu/rcutorture.c:921:26: note: each undeclared identifier is reported only once for each function it appears in
   kernel/rcu/rcutorture.c: In function 'rcu_torture_enable_rt_throttle':
   kernel/rcu/rcutorture.c:930:9: error: 'sysctl_sched_rt_runtime' undeclared (first use in this function); did you mean 'sysctl_sched_rr_timeslice'?
     930 |         sysctl_sched_rt_runtime = old_rt_runtime;
         |         ^~~~~~~~~~~~~~~~~~~~~~~
         |         sysctl_sched_rr_timeslice


vim +921 kernel/rcu/rcutorture.c

450efca7182a51 Joel Fernandes (Google  2018-06-10  909) 
450efca7182a51 Joel Fernandes (Google  2018-06-10  910) static void rcu_torture_disable_rt_throttle(void)
450efca7182a51 Joel Fernandes (Google  2018-06-10  911) {
450efca7182a51 Joel Fernandes (Google  2018-06-10  912) 	/*
450efca7182a51 Joel Fernandes (Google  2018-06-10  913) 	 * Disable RT throttling so that rcutorture's boost threads don't get
450efca7182a51 Joel Fernandes (Google  2018-06-10  914) 	 * throttled. Only possible if rcutorture is built-in otherwise the
450efca7182a51 Joel Fernandes (Google  2018-06-10  915) 	 * user should manually do this by setting the sched_rt_period_us and
450efca7182a51 Joel Fernandes (Google  2018-06-10  916) 	 * sched_rt_runtime sysctls.
450efca7182a51 Joel Fernandes (Google  2018-06-10  917) 	 */
450efca7182a51 Joel Fernandes (Google  2018-06-10  918) 	if (!IS_BUILTIN(CONFIG_RCU_TORTURE_TEST) || old_rt_runtime != -1)
450efca7182a51 Joel Fernandes (Google  2018-06-10  919) 		return;
450efca7182a51 Joel Fernandes (Google  2018-06-10  920) 
450efca7182a51 Joel Fernandes (Google  2018-06-10 @921) 	old_rt_runtime = sysctl_sched_rt_runtime;
450efca7182a51 Joel Fernandes (Google  2018-06-10  922) 	sysctl_sched_rt_runtime = -1;
450efca7182a51 Joel Fernandes (Google  2018-06-10  923) }
450efca7182a51 Joel Fernandes (Google  2018-06-10  924) 

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 3/8] sched: Move rt_period/runtime sysctls to rt.c
  2022-02-15  7:47     ` kernel test robot
@ 2022-02-15  7:53       ` Luis Chamberlain
  -1 siblings, 0 replies; 17+ messages in thread
From: Luis Chamberlain @ 2022-02-15  7:53 UTC (permalink / raw)
  To: kernel test robot
  Cc: Zhen Ni, mingo, peterz, juri.lelli, vincent.guittot, keescook,
	kbuild-all, linux-kernel, linux-fsdevel

Zhen,

please get lkp to add your git tree to test it before you submit
patches. The FAQ for Intel lkp describes what to do.

 Luis

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 3/8] sched: Move rt_period/runtime sysctls to rt.c
@ 2022-02-15  7:53       ` Luis Chamberlain
  0 siblings, 0 replies; 17+ messages in thread
From: Luis Chamberlain @ 2022-02-15  7:53 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 136 bytes --]

Zhen,

please get lkp to add your git tree to test it before you submit
patches. The FAQ for Intel lkp describes what to do.

 Luis

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 3/8] sched: Move rt_period/runtime sysctls to rt.c
  2022-02-15  5:22 ` [PATCH 3/8] sched: Move rt_period/runtime sysctls to rt.c Zhen Ni
@ 2022-02-15 11:23     ` kernel test robot
  2022-02-15 11:23     ` kernel test robot
  1 sibling, 0 replies; 17+ messages in thread
From: kernel test robot @ 2022-02-15 11:23 UTC (permalink / raw)
  To: Zhen Ni, mingo, peterz, juri.lelli, vincent.guittot, mcgrof, keescook
  Cc: llvm, kbuild-all, linux-kernel, linux-fsdevel, Zhen Ni

Hi Zhen,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on tip/sched/core]
[also build test ERROR on linus/master kees/for-next/pstore v5.17-rc4]
[cannot apply to next-20220214]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Zhen-Ni/sched-Move-a-series-of-sysctls-starting-with-sys-kernel-sched_/20220215-132416
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 3624ba7b5e2acc02b01301ea5fd3534971eb9896
config: hexagon-randconfig-r033-20220214 (https://download.01.org/0day-ci/archive/20220215/202202151705.Uez40mBM-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 37f422f4ac31c8b8041c6b62065263314282dab6)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/f93266963b3b3629980fa3384a5e37fd13f4c350
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Zhen-Ni/sched-Move-a-series-of-sysctls-starting-with-sys-kernel-sched_/20220215-132416
        git checkout f93266963b3b3629980fa3384a5e37fd13f4c350
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash kernel/rcu/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   kernel/rcu/rcutorture.c:380:16: warning: variable 'started' set but not used [-Wunused-but-set-variable]
           unsigned long started;
                         ^
   kernel/rcu/rcutorture.c:381:16: warning: variable 'completed' set but not used [-Wunused-but-set-variable]
           unsigned long completed;
                         ^
   kernel/rcu/rcutorture.c:384:21: warning: variable 'ts' set but not used [-Wunused-but-set-variable]
           unsigned long long ts;
                              ^
>> kernel/rcu/rcutorture.c:921:19: error: use of undeclared identifier 'sysctl_sched_rt_runtime'; did you mean 'sysctl_sched_rr_timeslice'?
           old_rt_runtime = sysctl_sched_rt_runtime;
                            ^~~~~~~~~~~~~~~~~~~~~~~
                            sysctl_sched_rr_timeslice
   include/linux/sched/sysctl.h:37:12: note: 'sysctl_sched_rr_timeslice' declared here
   extern int sysctl_sched_rr_timeslice;
              ^
   kernel/rcu/rcutorture.c:922:2: error: use of undeclared identifier 'sysctl_sched_rt_runtime'
           sysctl_sched_rt_runtime = -1;
           ^
   kernel/rcu/rcutorture.c:930:2: error: use of undeclared identifier 'sysctl_sched_rt_runtime'
           sysctl_sched_rt_runtime = old_rt_runtime;
           ^
   kernel/rcu/rcutorture.c:1620:21: warning: variable 'ts' set but not used [-Wunused-but-set-variable]
           unsigned long long ts;
                              ^
   4 warnings and 3 errors generated.


vim +921 kernel/rcu/rcutorture.c

450efca7182a516 Joel Fernandes (Google  2018-06-10  909) 
450efca7182a516 Joel Fernandes (Google  2018-06-10  910) static void rcu_torture_disable_rt_throttle(void)
450efca7182a516 Joel Fernandes (Google  2018-06-10  911) {
450efca7182a516 Joel Fernandes (Google  2018-06-10  912) 	/*
450efca7182a516 Joel Fernandes (Google  2018-06-10  913) 	 * Disable RT throttling so that rcutorture's boost threads don't get
450efca7182a516 Joel Fernandes (Google  2018-06-10  914) 	 * throttled. Only possible if rcutorture is built-in otherwise the
450efca7182a516 Joel Fernandes (Google  2018-06-10  915) 	 * user should manually do this by setting the sched_rt_period_us and
450efca7182a516 Joel Fernandes (Google  2018-06-10  916) 	 * sched_rt_runtime sysctls.
450efca7182a516 Joel Fernandes (Google  2018-06-10  917) 	 */
450efca7182a516 Joel Fernandes (Google  2018-06-10  918) 	if (!IS_BUILTIN(CONFIG_RCU_TORTURE_TEST) || old_rt_runtime != -1)
450efca7182a516 Joel Fernandes (Google  2018-06-10  919) 		return;
450efca7182a516 Joel Fernandes (Google  2018-06-10  920) 
450efca7182a516 Joel Fernandes (Google  2018-06-10 @921) 	old_rt_runtime = sysctl_sched_rt_runtime;
450efca7182a516 Joel Fernandes (Google  2018-06-10  922) 	sysctl_sched_rt_runtime = -1;
450efca7182a516 Joel Fernandes (Google  2018-06-10  923) }
450efca7182a516 Joel Fernandes (Google  2018-06-10  924) 

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 3/8] sched: Move rt_period/runtime sysctls to rt.c
@ 2022-02-15 11:23     ` kernel test robot
  0 siblings, 0 replies; 17+ messages in thread
From: kernel test robot @ 2022-02-15 11:23 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4834 bytes --]

Hi Zhen,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on tip/sched/core]
[also build test ERROR on linus/master kees/for-next/pstore v5.17-rc4]
[cannot apply to next-20220214]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Zhen-Ni/sched-Move-a-series-of-sysctls-starting-with-sys-kernel-sched_/20220215-132416
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 3624ba7b5e2acc02b01301ea5fd3534971eb9896
config: hexagon-randconfig-r033-20220214 (https://download.01.org/0day-ci/archive/20220215/202202151705.Uez40mBM-lkp(a)intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 37f422f4ac31c8b8041c6b62065263314282dab6)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/f93266963b3b3629980fa3384a5e37fd13f4c350
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Zhen-Ni/sched-Move-a-series-of-sysctls-starting-with-sys-kernel-sched_/20220215-132416
        git checkout f93266963b3b3629980fa3384a5e37fd13f4c350
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash kernel/rcu/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   kernel/rcu/rcutorture.c:380:16: warning: variable 'started' set but not used [-Wunused-but-set-variable]
           unsigned long started;
                         ^
   kernel/rcu/rcutorture.c:381:16: warning: variable 'completed' set but not used [-Wunused-but-set-variable]
           unsigned long completed;
                         ^
   kernel/rcu/rcutorture.c:384:21: warning: variable 'ts' set but not used [-Wunused-but-set-variable]
           unsigned long long ts;
                              ^
>> kernel/rcu/rcutorture.c:921:19: error: use of undeclared identifier 'sysctl_sched_rt_runtime'; did you mean 'sysctl_sched_rr_timeslice'?
           old_rt_runtime = sysctl_sched_rt_runtime;
                            ^~~~~~~~~~~~~~~~~~~~~~~
                            sysctl_sched_rr_timeslice
   include/linux/sched/sysctl.h:37:12: note: 'sysctl_sched_rr_timeslice' declared here
   extern int sysctl_sched_rr_timeslice;
              ^
   kernel/rcu/rcutorture.c:922:2: error: use of undeclared identifier 'sysctl_sched_rt_runtime'
           sysctl_sched_rt_runtime = -1;
           ^
   kernel/rcu/rcutorture.c:930:2: error: use of undeclared identifier 'sysctl_sched_rt_runtime'
           sysctl_sched_rt_runtime = old_rt_runtime;
           ^
   kernel/rcu/rcutorture.c:1620:21: warning: variable 'ts' set but not used [-Wunused-but-set-variable]
           unsigned long long ts;
                              ^
   4 warnings and 3 errors generated.


vim +921 kernel/rcu/rcutorture.c

450efca7182a516 Joel Fernandes (Google  2018-06-10  909) 
450efca7182a516 Joel Fernandes (Google  2018-06-10  910) static void rcu_torture_disable_rt_throttle(void)
450efca7182a516 Joel Fernandes (Google  2018-06-10  911) {
450efca7182a516 Joel Fernandes (Google  2018-06-10  912) 	/*
450efca7182a516 Joel Fernandes (Google  2018-06-10  913) 	 * Disable RT throttling so that rcutorture's boost threads don't get
450efca7182a516 Joel Fernandes (Google  2018-06-10  914) 	 * throttled. Only possible if rcutorture is built-in otherwise the
450efca7182a516 Joel Fernandes (Google  2018-06-10  915) 	 * user should manually do this by setting the sched_rt_period_us and
450efca7182a516 Joel Fernandes (Google  2018-06-10  916) 	 * sched_rt_runtime sysctls.
450efca7182a516 Joel Fernandes (Google  2018-06-10  917) 	 */
450efca7182a516 Joel Fernandes (Google  2018-06-10  918) 	if (!IS_BUILTIN(CONFIG_RCU_TORTURE_TEST) || old_rt_runtime != -1)
450efca7182a516 Joel Fernandes (Google  2018-06-10  919) 		return;
450efca7182a516 Joel Fernandes (Google  2018-06-10  920) 
450efca7182a516 Joel Fernandes (Google  2018-06-10 @921) 	old_rt_runtime = sysctl_sched_rt_runtime;
450efca7182a516 Joel Fernandes (Google  2018-06-10  922) 	sysctl_sched_rt_runtime = -1;
450efca7182a516 Joel Fernandes (Google  2018-06-10  923) }
450efca7182a516 Joel Fernandes (Google  2018-06-10  924) 

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-02-15 11:23 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-15  5:22 [PATCH 0/8] sched: Move a series of sysctls starting with sys/kernel/sched_* Zhen Ni
2022-02-15  5:22 ` [PATCH 1/8] sched: Move child_runs_first sysctls to fair.c Zhen Ni
2022-02-15  5:22   ` Zhen Ni
2022-02-15  5:22 ` [PATCH 2/8] sched: Move schedstats sysctls to core.c Zhen Ni
2022-02-15  5:22 ` [PATCH 3/8] sched: Move rt_period/runtime sysctls to rt.c Zhen Ni
2022-02-15  7:47   ` kernel test robot
2022-02-15  7:47     ` kernel test robot
2022-02-15  7:53     ` Luis Chamberlain
2022-02-15  7:53       ` Luis Chamberlain
2022-02-15 11:23   ` kernel test robot
2022-02-15 11:23     ` kernel test robot
2022-02-15  5:22 ` [PATCH 4/8] sched: Move deadline_period sysctls to deadline.c Zhen Ni
2022-02-15  5:22 ` [PATCH 5/8] sched: Move rr_timeslice sysctls to rt.c Zhen Ni
2022-02-15  5:22 ` [PATCH 6/8] sched: Move uclamp_util sysctls to core.c Zhen Ni
2022-02-15  5:22 ` [PATCH 7/8] sched: Move cfs_bandwidth_slice sysctls to fair.c Zhen Ni
2022-02-15  5:22 ` [PATCH 8/8] sched: Move energy_aware sysctls to topology.c Zhen Ni
2022-02-15  6:01 ` [PATCH 0/8] sched: Move a series of sysctls starting with sys/kernel/sched_* Chaitanya Kulkarni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.