diff options
author | Zhen Ni <nizhen@uniontech.com> | 2022-02-15 14:45:57 +0300 |
---|---|---|
committer | Luis Chamberlain <mcgrof@kernel.org> | 2022-04-06 23:43:43 +0300 |
commit | a60707d74bd1d119cf7bcc5101cda912fc46d5e3 (patch) | |
tree | 91c01a9c81a6174295b95bde8fbfee1521513bd0 /kernel/sched/fair.c | |
parent | 3123109284176b1532874591f7c81f3837bbdc17 (diff) | |
download | linux-a60707d74bd1d119cf7bcc5101cda912fc46d5e3.tar.xz |
sched: Move child_runs_first sysctls to fair.c
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>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'kernel/sched/fair.c')
-rw-r--r-- | kernel/sched/fair.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index d4bd299d67ab..788b1d6a3248 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -109,6 +109,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. |