mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
sysctl: Introduce compatibility layer to appease OOS when !SCHED_WALT
Based on 441d1a2 ("sysctl: Expose a few additional sched features to appease OOS when !SCHED_WALT") This creates a set of no-op proc nodes to stand in for certain features specific to SCHED_WALT for the purpose of appeasing userspace and preventing runaway error spamming to logcat during interactions, e.g. ANDR-PERF-UTIL Failed to read /proc/sys/kernel/sched_busy_hyst_ns ANDR-PERF-OPTSHANDLER Failed to read /proc/sys/kernel/sched_busy_hyst_ns ANDR-PERF-UTIL Failed to read /proc/sys/kernel/sched_prefer_spread ANDR-PERF-OPTSHANDLER Failed to read /proc/sys/kernel/sched_prefer_spread ANDR-PERF-UTIL Failed to read /proc/sys/kernel/sched_busy_hysteresis_enable_cpus ANDR-PERF-OPTSHANDLER Failed to read /proc/sys/kernel/sched_busy_hysteresis_enable_cpus Please note that these nodes do not function properly, or at all, and exist solely to provide CAF's performance HAL with something to read and write meaningless numbers to. Change-Id: I17dcd6def7ce4dcbc1a4be2b51727e85a18c050e Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com> Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This commit is contained in:
parent
8233923846
commit
4495d7afcc
@ -63,6 +63,16 @@ extern unsigned int sysctl_preemptoff_tracing_threshold_ns;
|
||||
extern unsigned int sysctl_irqsoff_tracing_threshold_ns;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PELT_COMPATIBILITY_LAYER
|
||||
static unsigned int sysctl_sched_boost;
|
||||
static unsigned int sysctl_sched_prefer_spread;
|
||||
static unsigned int sysctl_sched_busy_hyst_enable_cpus;
|
||||
static unsigned int sysctl_sched_busy_hyst;
|
||||
static unsigned int sysctl_sched_group_upmigrate_pct;
|
||||
static unsigned int sysctl_sched_group_downmigrate_pct;
|
||||
static unsigned int sysctl_sched_ravg_window_nr_ticks;
|
||||
#endif /* CONFIG_PELT_COMPATIBILITY_LAYER */
|
||||
|
||||
enum sched_tunable_scaling {
|
||||
SCHED_TUNABLESCALING_NONE,
|
||||
SCHED_TUNABLESCALING_LOG,
|
||||
|
10
init/Kconfig
10
init/Kconfig
@ -729,6 +729,16 @@ config PELT_UTIL_HALFLIFE_8
|
||||
|
||||
endchoice
|
||||
|
||||
config PELT_COMPATIBILITY_LAYER
|
||||
bool "Compatibility layer for Qualcomm performance HALs"
|
||||
default y
|
||||
depends on !SCHED_WALT
|
||||
help
|
||||
This option enables a non-operational compatibility layer for use in
|
||||
lieu of Window Assisted Load Tracking on systems which expect it.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
endmenu # FAIR Scheduler tunables"
|
||||
|
||||
#
|
||||
|
@ -137,6 +137,12 @@ extern int direct_vm_swappiness;
|
||||
static int two_hundred = 200;
|
||||
#endif /* CONFIG_OPLUS_MM_HACKS */
|
||||
static int one_thousand = 1000;
|
||||
#ifdef CONFIG_PELT_COMPATIBILITY_LAYER
|
||||
static int two_hundred_fifty_five = 255;
|
||||
static unsigned int ns_per_sec = NSEC_PER_SEC;
|
||||
static unsigned int __read_mostly sysctl_sched_group_upmigrate_pct = 100;
|
||||
static unsigned int __read_mostly sysctl_sched_group_downmigrate_pct = 95;
|
||||
#endif /* CONFIG_PELT_COMPATIBILITY_LAYER */
|
||||
#ifdef CONFIG_SCHED_WALT
|
||||
static int two_million = 2000000;
|
||||
#endif
|
||||
@ -346,6 +352,68 @@ static int max_extfrag_threshold = 1000;
|
||||
#endif
|
||||
|
||||
static struct ctl_table kern_table[] = {
|
||||
#ifdef CONFIG_PELT_COMPATIBILITY_LAYER
|
||||
{
|
||||
.procname = "sched_boost",
|
||||
.data = &sysctl_sched_boost,
|
||||
.maxlen = sizeof(unsigned int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec_minmax,
|
||||
.extra1 = &neg_three,
|
||||
.extra2 = &three,
|
||||
},
|
||||
{
|
||||
.procname = "sched_prefer_spread",
|
||||
.data = &sysctl_sched_prefer_spread,
|
||||
.maxlen = sizeof(unsigned int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec_minmax,
|
||||
.extra1 = &zero,
|
||||
.extra2 = &four,
|
||||
},
|
||||
{
|
||||
.procname = "sched_busy_hysteresis_enable_cpus",
|
||||
.data = &sysctl_sched_busy_hyst_enable_cpus,
|
||||
.maxlen = sizeof(unsigned int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec_minmax,
|
||||
.extra1 = &zero,
|
||||
.extra2 = &two_hundred_fifty_five,
|
||||
},
|
||||
{
|
||||
.procname = "sched_busy_hyst_ns",
|
||||
.data = &sysctl_sched_busy_hyst,
|
||||
.maxlen = sizeof(unsigned int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec_minmax,
|
||||
.extra1 = &zero,
|
||||
.extra2 = &ns_per_sec,
|
||||
},
|
||||
{
|
||||
.procname = "sched_group_upmigrate",
|
||||
.data = &sysctl_sched_group_upmigrate_pct,
|
||||
.maxlen = sizeof(unsigned int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec_minmax,
|
||||
.extra1 = &sysctl_sched_group_downmigrate_pct,
|
||||
},
|
||||
{
|
||||
.procname = "sched_group_downmigrate",
|
||||
.data = &sysctl_sched_group_downmigrate_pct,
|
||||
.maxlen = sizeof(unsigned int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec_minmax,
|
||||
.extra1 = &zero,
|
||||
.extra2 = &sysctl_sched_group_upmigrate_pct,
|
||||
},
|
||||
{
|
||||
.procname = "sched_ravg_window_nr_ticks",
|
||||
.data = &sysctl_sched_ravg_window_nr_ticks,
|
||||
.maxlen = sizeof(unsigned int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec_minmax,
|
||||
},
|
||||
#endif /* CONFIG_PELT_COMPATIBILITY_LAYER */
|
||||
{
|
||||
.procname = "sched_child_runs_first",
|
||||
.data = &sysctl_sched_child_runs_first,
|
||||
|
Loading…
x
Reference in New Issue
Block a user