sched: EAS: take cstate into account when selecting idle core
[firefly-linux-kernel-4.4.55.git] / include / linux / sched / sysctl.h
1 #ifndef _SCHED_SYSCTL_H
2 #define _SCHED_SYSCTL_H
3
4 #ifdef CONFIG_DETECT_HUNG_TASK
5 extern int           sysctl_hung_task_check_count;
6 extern unsigned int  sysctl_hung_task_panic;
7 extern unsigned long sysctl_hung_task_timeout_secs;
8 extern int sysctl_hung_task_warnings;
9 extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
10                                          void __user *buffer,
11                                          size_t *lenp, loff_t *ppos);
12 #else
13 /* Avoid need for ifdefs elsewhere in the code */
14 enum { sysctl_hung_task_timeout_secs = 0 };
15 #endif
16
17 /*
18  * Default maximum number of active map areas, this limits the number of vmas
19  * per mm struct. Users can overwrite this number by sysctl but there is a
20  * problem.
21  *
22  * When a program's coredump is generated as ELF format, a section is created
23  * per a vma. In ELF, the number of sections is represented in unsigned short.
24  * This means the number of sections should be smaller than 65535 at coredump.
25  * Because the kernel adds some informative sections to a image of program at
26  * generating coredump, we need some margin. The number of extra sections is
27  * 1-3 now and depends on arch. We use "5" as safe margin, here.
28  *
29  * ELF extended numbering allows more than 65535 sections, so 16-bit bound is
30  * not a hard limit any more. Although some userspace tools can be surprised by
31  * that.
32  */
33 #define MAPCOUNT_ELF_CORE_MARGIN        (5)
34 #define DEFAULT_MAX_MAP_COUNT   (USHRT_MAX - MAPCOUNT_ELF_CORE_MARGIN)
35
36 extern int sysctl_max_map_count;
37
38 extern unsigned int sysctl_sched_latency;
39 extern unsigned int sysctl_sched_min_granularity;
40 extern unsigned int sysctl_sched_wakeup_granularity;
41 extern unsigned int sysctl_sched_child_runs_first;
42 extern unsigned int sysctl_sched_cstate_aware;
43
44 enum sched_tunable_scaling {
45         SCHED_TUNABLESCALING_NONE,
46         SCHED_TUNABLESCALING_LOG,
47         SCHED_TUNABLESCALING_LINEAR,
48         SCHED_TUNABLESCALING_END,
49 };
50 extern enum sched_tunable_scaling sysctl_sched_tunable_scaling;
51
52 extern unsigned int sysctl_numa_balancing_scan_delay;
53 extern unsigned int sysctl_numa_balancing_scan_period_min;
54 extern unsigned int sysctl_numa_balancing_scan_period_max;
55 extern unsigned int sysctl_numa_balancing_scan_size;
56
57 #ifdef CONFIG_SCHED_DEBUG
58 extern unsigned int sysctl_sched_migration_cost;
59 extern unsigned int sysctl_sched_nr_migrate;
60 extern unsigned int sysctl_sched_time_avg;
61 extern unsigned int sysctl_sched_shares_window;
62
63 int sched_proc_update_handler(struct ctl_table *table, int write,
64                 void __user *buffer, size_t *length,
65                 loff_t *ppos);
66 #endif
67
68 /*
69  *  control realtime throttling:
70  *
71  *  /proc/sys/kernel/sched_rt_period_us
72  *  /proc/sys/kernel/sched_rt_runtime_us
73  */
74 extern unsigned int sysctl_sched_rt_period;
75 extern int sysctl_sched_rt_runtime;
76
77 #ifdef CONFIG_CFS_BANDWIDTH
78 extern unsigned int sysctl_sched_cfs_bandwidth_slice;
79 #endif
80
81 #ifdef CONFIG_SCHED_TUNE
82 extern unsigned int sysctl_sched_cfs_boost;
83 int sysctl_sched_cfs_boost_handler(struct ctl_table *table, int write,
84                                    void __user *buffer, size_t *length,
85                                    loff_t *ppos);
86 static inline unsigned int get_sysctl_sched_cfs_boost(void)
87 {
88         return sysctl_sched_cfs_boost;
89 }
90 #else
91 static inline unsigned int get_sysctl_sched_cfs_boost(void)
92 {
93         return 0;
94 }
95 #endif
96
97 #ifdef CONFIG_SCHED_AUTOGROUP
98 extern unsigned int sysctl_sched_autogroup_enabled;
99 #endif
100
101 extern int sched_rr_timeslice;
102
103 extern int sched_rr_handler(struct ctl_table *table, int write,
104                 void __user *buffer, size_t *lenp,
105                 loff_t *ppos);
106
107 extern int sched_rt_handler(struct ctl_table *table, int write,
108                 void __user *buffer, size_t *lenp,
109                 loff_t *ppos);
110
111 extern int sysctl_numa_balancing(struct ctl_table *table, int write,
112                                  void __user *buffer, size_t *lenp,
113                                  loff_t *ppos);
114
115 #endif /* _SCHED_SYSCTL_H */