xref: /linux-6.15/include/linux/sched/sysctl.h (revision d4ae80ff)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_SCHED_SYSCTL_H
3 #define _LINUX_SCHED_SYSCTL_H
4 
5 #include <linux/types.h>
6 
7 struct ctl_table;
8 
9 #ifdef CONFIG_DETECT_HUNG_TASK
10 /* used for hung_task and block/ */
11 extern unsigned long sysctl_hung_task_timeout_secs;
12 #else
13 /* Avoid need for ifdefs elsewhere in the code */
14 enum { sysctl_hung_task_timeout_secs = 0 };
15 #endif
16 
17 enum sched_tunable_scaling {
18 	SCHED_TUNABLESCALING_NONE,
19 	SCHED_TUNABLESCALING_LOG,
20 	SCHED_TUNABLESCALING_LINEAR,
21 	SCHED_TUNABLESCALING_END,
22 };
23 
24 #define NUMA_BALANCING_DISABLED		0x0
25 #define NUMA_BALANCING_NORMAL		0x1
26 #define NUMA_BALANCING_MEMORY_TIERING	0x2
27 
28 #ifdef CONFIG_NUMA_BALANCING
29 extern int sysctl_numa_balancing_mode;
30 #else
31 #define sysctl_numa_balancing_mode	0
32 #endif
33 
34 int sysctl_numa_balancing(struct ctl_table *table, int write, void *buffer,
35 		size_t *lenp, loff_t *ppos);
36 
37 #if defined(CONFIG_ENERGY_MODEL) && defined(CONFIG_CPU_FREQ_GOV_SCHEDUTIL)
38 extern unsigned int sysctl_sched_energy_aware;
39 int sched_energy_aware_handler(struct ctl_table *table, int write,
40 		void *buffer, size_t *lenp, loff_t *ppos);
41 #endif
42 
43 #endif /* _LINUX_SCHED_SYSCTL_H */
44