Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Ingo Molnar | 9ccd27c | 2017-02-03 21:11:09 +0100 | [diff] [blame] | 2 | #ifndef _LINUX_SCHED_SYSCTL_H |
| 3 | #define _LINUX_SCHED_SYSCTL_H |
| 4 | |
| 5 | #include <linux/types.h> |
| 6 | |
| 7 | struct ctl_table; |
Clark Williams | cf4aebc2 | 2013-02-07 09:46:59 -0600 | [diff] [blame] | 8 | |
| 9 | #ifdef CONFIG_DETECT_HUNG_TASK |
Li Zefan | cd64647 | 2013-09-23 16:43:58 +0800 | [diff] [blame] | 10 | extern int sysctl_hung_task_check_count; |
Clark Williams | cf4aebc2 | 2013-02-07 09:46:59 -0600 | [diff] [blame] | 11 | extern unsigned int sysctl_hung_task_panic; |
Clark Williams | cf4aebc2 | 2013-02-07 09:46:59 -0600 | [diff] [blame] | 12 | extern unsigned long sysctl_hung_task_timeout_secs; |
Aaron Tomlin | 270750db | 2014-01-20 17:34:13 +0000 | [diff] [blame] | 13 | extern int sysctl_hung_task_warnings; |
Clark Williams | cf4aebc2 | 2013-02-07 09:46:59 -0600 | [diff] [blame] | 14 | extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write, |
| 15 | void __user *buffer, |
| 16 | size_t *lenp, loff_t *ppos); |
| 17 | #else |
| 18 | /* Avoid need for ifdefs elsewhere in the code */ |
| 19 | enum { sysctl_hung_task_timeout_secs = 0 }; |
| 20 | #endif |
| 21 | |
Clark Williams | cf4aebc2 | 2013-02-07 09:46:59 -0600 | [diff] [blame] | 22 | extern unsigned int sysctl_sched_latency; |
| 23 | extern unsigned int sysctl_sched_min_granularity; |
| 24 | extern unsigned int sysctl_sched_wakeup_granularity; |
| 25 | extern unsigned int sysctl_sched_child_runs_first; |
| 26 | |
| 27 | enum sched_tunable_scaling { |
| 28 | SCHED_TUNABLESCALING_NONE, |
| 29 | SCHED_TUNABLESCALING_LOG, |
| 30 | SCHED_TUNABLESCALING_LINEAR, |
| 31 | SCHED_TUNABLESCALING_END, |
| 32 | }; |
| 33 | extern enum sched_tunable_scaling sysctl_sched_tunable_scaling; |
| 34 | |
| 35 | extern unsigned int sysctl_numa_balancing_scan_delay; |
| 36 | extern unsigned int sysctl_numa_balancing_scan_period_min; |
| 37 | extern unsigned int sysctl_numa_balancing_scan_period_max; |
Clark Williams | cf4aebc2 | 2013-02-07 09:46:59 -0600 | [diff] [blame] | 38 | extern unsigned int sysctl_numa_balancing_scan_size; |
Clark Williams | cf4aebc2 | 2013-02-07 09:46:59 -0600 | [diff] [blame] | 39 | |
| 40 | #ifdef CONFIG_SCHED_DEBUG |
Matthias Kaehlcke | a9903f0 | 2017-10-30 11:08:16 -0700 | [diff] [blame] | 41 | extern __read_mostly unsigned int sysctl_sched_migration_cost; |
| 42 | extern __read_mostly unsigned int sysctl_sched_nr_migrate; |
| 43 | extern __read_mostly unsigned int sysctl_sched_time_avg; |
Clark Williams | cf4aebc2 | 2013-02-07 09:46:59 -0600 | [diff] [blame] | 44 | |
| 45 | int sched_proc_update_handler(struct ctl_table *table, int write, |
| 46 | void __user *buffer, size_t *length, |
| 47 | loff_t *ppos); |
| 48 | #endif |
Clark Williams | ce0dbbb | 2013-02-07 09:47:04 -0600 | [diff] [blame] | 49 | |
| 50 | /* |
| 51 | * control realtime throttling: |
| 52 | * |
| 53 | * /proc/sys/kernel/sched_rt_period_us |
| 54 | * /proc/sys/kernel/sched_rt_runtime_us |
| 55 | */ |
Clark Williams | cf4aebc2 | 2013-02-07 09:46:59 -0600 | [diff] [blame] | 56 | extern unsigned int sysctl_sched_rt_period; |
| 57 | extern int sysctl_sched_rt_runtime; |
| 58 | |
| 59 | #ifdef CONFIG_CFS_BANDWIDTH |
| 60 | extern unsigned int sysctl_sched_cfs_bandwidth_slice; |
| 61 | #endif |
| 62 | |
| 63 | #ifdef CONFIG_SCHED_AUTOGROUP |
| 64 | extern unsigned int sysctl_sched_autogroup_enabled; |
| 65 | #endif |
| 66 | |
Shile Zhang | 975e155 | 2017-01-28 22:00:49 +0800 | [diff] [blame] | 67 | extern int sysctl_sched_rr_timeslice; |
Clark Williams | ce0dbbb | 2013-02-07 09:47:04 -0600 | [diff] [blame] | 68 | extern int sched_rr_timeslice; |
| 69 | |
| 70 | extern int sched_rr_handler(struct ctl_table *table, int write, |
| 71 | void __user *buffer, size_t *lenp, |
| 72 | loff_t *ppos); |
| 73 | |
| 74 | extern int sched_rt_handler(struct ctl_table *table, int write, |
Clark Williams | cf4aebc2 | 2013-02-07 09:46:59 -0600 | [diff] [blame] | 75 | void __user *buffer, size_t *lenp, |
| 76 | loff_t *ppos); |
| 77 | |
Andi Kleen | 54a43d5 | 2014-01-23 15:53:13 -0800 | [diff] [blame] | 78 | extern int sysctl_numa_balancing(struct ctl_table *table, int write, |
| 79 | void __user *buffer, size_t *lenp, |
| 80 | loff_t *ppos); |
| 81 | |
Mel Gorman | cb25176 | 2016-02-05 09:08:36 +0000 | [diff] [blame] | 82 | extern int sysctl_schedstats(struct ctl_table *table, int write, |
| 83 | void __user *buffer, size_t *lenp, |
| 84 | loff_t *ppos); |
| 85 | |
Ingo Molnar | 9ccd27c | 2017-02-03 21:11:09 +0100 | [diff] [blame] | 86 | #endif /* _LINUX_SCHED_SYSCTL_H */ |