diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig index db8c2890accd..6cfaaeb2e79a 100644 --- a/drivers/cpufreq/Kconfig +++ b/drivers/cpufreq/Kconfig @@ -230,24 +230,6 @@ config CPU_FREQ_GOV_SCHEDUTIL If in doubt, say N. -if CPU_FREQ_GOV_SCHEDUTIL - -config SCHEDUTIL_UP_RATE_LIMIT - int "Default up rate-limit for schedutil" - default 1000 - help - This sets schedutil's default frequency up rate-limit in - microseconds. - -config SCHEDUTIL_DOWN_RATE_LIMIT - int "Default down rate-limit for schedutil" - default 1000 - help - This sets schedutil's default frequency down rate-limit in - microseconds. - -endif - config CPU_FREQ_GOV_INTERACTIVE tristate "'interactive' cpufreq policy governor" depends on CPU_FREQ @@ -268,33 +250,6 @@ config CPU_FREQ_GOV_INTERACTIVE If in doubt, say N. -config CPU_FREQ_DEFAULT_LITTLE_MIN - int "Default minimum frequency for the little cluster" - default 0 - help - This sets the default minimum frequency (in kHz) for the little CPU - cluster. - - If in doubt, say 0 to use the hardware's minimum frequency. - -config CPU_FREQ_DEFAULT_BIG_MIN - int "Default minimum frequency for the big cluster" - default 0 - help - This sets the default minimum frequency (in kHz) for the big CPU - cluster. - - If in doubt, say 0 to use the hardware's minimum frequency. - -config CPU_FREQ_DEFAULT_PRIME_MIN - int "Default minimum frequency for the prime cluster" - default 0 - help - This sets the default minimum frequency (in kHz) for the prime CPU - cluster. - - If in doubt, say 0 to use the hardware's minimum frequency. - comment "CPU frequency scaling drivers" config CPUFREQ_DT diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index db33268b47fa..a9c484519369 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -727,9 +727,6 @@ static ssize_t store_##file_name \ int ret, temp; \ struct cpufreq_policy new_policy; \ \ - if (&policy->object == &policy->min) \ - return count; \ - \ memcpy(&new_policy, policy, sizeof(*policy)); \ new_policy.min = policy->user_policy.min; \ new_policy.max = policy->user_policy.max; \ diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.c index 060b5c03ea9c..7f205ec61244 100644 --- a/drivers/cpufreq/freq_table.c +++ b/drivers/cpufreq/freq_table.c @@ -61,19 +61,6 @@ int cpufreq_frequency_table_cpuinfo(struct cpufreq_policy *policy, if (max_freq > cpuinfo_max_freq_cached) cpuinfo_max_freq_cached = max_freq; -#if CONFIG_CPU_FREQ_DEFAULT_LITTLE_MIN - if (cpumask_test_cpu(policy->cpu, cpu_lp_mask)) - policy->min = CONFIG_CPU_FREQ_DEFAULT_LITTLE_MIN; -#endif -#if CONFIG_CPU_FREQ_DEFAULT_BIG_MIN - if (cpumask_test_cpu(policy->cpu, cpu_perf_mask)) - policy->min = CONFIG_CPU_FREQ_DEFAULT_BIG_MIN; -#endif -#if CONFIG_CPU_FREQ_DEFAULT_PRIME_MIN - if (cpumask_test_cpu(policy->cpu, cpu_perfp_mask)) - policy->min = CONFIG_CPU_FREQ_DEFAULT_PRIME_MIN; -#endif - if (policy->min == ~0) return -EINVAL; else diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index ef6f37c7ed39..b0abe21d6cc9 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h @@ -148,19 +148,4 @@ extern int do_execveat(int, struct filename *, const char __user * const __user *, int); -static inline bool task_is_booster(struct task_struct *tsk) -{ - char comm[sizeof(tsk->comm)]; - - get_task_comm(comm, tsk); - return !strcmp(comm, "init") || !strcmp(comm, "NodeLooperThrea") || - !strcmp(comm, "power@1.2-servi") || - !strcmp(comm, "power@1.3-servi") || - !strcmp(comm, "perf@1.0-servic") || - !strcmp(comm, "perf@2.0-servic") || - !strcmp(comm, "power@2.0-servic") || - !strcmp(comm, "iop@") || - !strcmp(comm, "init.qcom.post_"); -} - #endif /* _LINUX_BINFMTS_H */ diff --git a/init/Kconfig b/init/Kconfig index 16ccb418ca32..a3dd8e273713 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1123,61 +1123,6 @@ config SCHED_TUNE If unsure, say N. -config CPUSETS_ASSIST - bool "Cpuset configuration helper" - depends on CPUSETS - depends on ANDROID - help - This option enables in-kernel overrides for cpuset values. - - If unsure, say N. - -if CPUSETS_ASSIST - -config CPUSET_AUDIO_APP - string "Value for 'audio-app' cpuset" - default "1-2" - help - The CPU mask to use for the audio-app cpuset. - -config CPUSET_BG - string "Value for 'background' cpuset" - default "0-3" - help - The CPU mask to use for the audio-app cpuset. - -config CPUSET_CAMERA - string "Value for 'camera-daemon' cpuset" - default "4-7" - help - The CPU mask to use for the audio-app cpuset. - -config CPUSET_FG - string "Value for 'foreground' cpuset" - default "0-7" - help - The CPU mask to use for the audio-app cpuset. - -config CPUSET_RESTRICTED - string "Value for 'restricted' cpuset" - default "0-7" - help - The CPU mask to use for the audio-app cpuset. - -config CPUSET_SYSTEM_BG - string "Value for 'system-background' cpuset" - default "0-3" - help - The CPU mask to use for the audio-app cpuset. - -config CPUSET_TOP_APP - string "Value for 'top-app' cpuset" - default "0-7" - help - The CPU mask to use for the audio-app cpuset. - -endif - config DEFAULT_USE_ENERGY_AWARE bool "Default to enabling the Energy Aware Scheduler feature" default n diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index 84e3543548cc..f6989f24c80c 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -57,7 +57,6 @@ #include #include #include -#include #include #include @@ -138,13 +137,6 @@ struct cpuset { int relax_domain_level; }; -#ifdef CONFIG_CPUSETS_ASSIST -struct cs_target { - const char *name; - char *cpus; -}; -#endif - static inline struct cpuset *css_cs(struct cgroup_subsys_state *css) { return css ? container_of(css, struct cpuset, css) : NULL; @@ -1721,6 +1713,8 @@ static ssize_t cpuset_write_resmask(struct kernfs_open_file *of, struct cpuset *trialcs; int retval = -ENODEV; + buf = strstrip(buf); + /* * CPU or memory hotunplug may leave @cs w/o any execution * resources, in which case the hotplug code asynchronously updates @@ -1775,48 +1769,6 @@ out_unlock: return retval ?: nbytes; } -#ifdef CONFIG_CPUSETS_ASSIST -static ssize_t cpuset_write_resmask_assist(struct kernfs_open_file *of, - struct cs_target tgt, size_t nbytes, - loff_t off) -{ - pr_info("cpuset_assist: setting %s to %s\n", tgt.name, tgt.cpus); - return cpuset_write_resmask(of, tgt.cpus, nbytes, off); -} -#endif - -static ssize_t cpuset_write_resmask_wrapper(struct kernfs_open_file *of, - char *buf, size_t nbytes, loff_t off) -{ -#ifdef CONFIG_CPUSETS_ASSIST - static struct cs_target cs_targets[] = { - { "audio-app", CONFIG_CPUSET_AUDIO_APP }, - { "background", CONFIG_CPUSET_BG }, - { "camera-daemon", CONFIG_CPUSET_CAMERA }, - { "foreground", CONFIG_CPUSET_FG }, - { "restricted", CONFIG_CPUSET_RESTRICTED }, - { "system-background", CONFIG_CPUSET_SYSTEM_BG }, - { "top-app", CONFIG_CPUSET_TOP_APP }, - }; - struct cpuset *cs = css_cs(of_css(of)); - int i; - - if (task_is_booster(current)) { - for (i = 0; i < ARRAY_SIZE(cs_targets); i++) { - struct cs_target tgt = cs_targets[i]; - - if (!strcmp(cs->css.cgroup->kn->name, tgt.name)) - return cpuset_write_resmask_assist(of, tgt, - nbytes, off); - } - } -#endif - - buf = strstrip(buf); - - return cpuset_write_resmask(of, buf, nbytes, off); -} - /* * These ascii lists should be read in a single call, by using a user * buffer large enough to hold the entire map. If read in smaller @@ -1909,7 +1861,7 @@ static struct cftype files[] = { { .name = "cpus", .seq_show = cpuset_common_seq_show, - .write = cpuset_write_resmask_wrapper, + .write = cpuset_write_resmask, .max_write_len = (100U + 6 * NR_CPUS), .private = FILE_CPULIST, }, diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c index 6dc39362cbef..568605c11d8d 100644 --- a/kernel/sched/cpufreq_schedutil.c +++ b/kernel/sched/cpufreq_schedutil.c @@ -11,7 +11,6 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt -#include #include #include #include @@ -686,9 +685,6 @@ static ssize_t up_rate_limit_us_store(struct gov_attr_set *attr_set, struct sugov_policy *sg_policy; unsigned int rate_limit_us; - if (task_is_booster(current)) - return count; - if (kstrtouint(buf, 10, &rate_limit_us)) return -EINVAL; @@ -709,9 +705,6 @@ static ssize_t down_rate_limit_us_store(struct gov_attr_set *attr_set, struct sugov_policy *sg_policy; unsigned int rate_limit_us; - if (task_is_booster(current)) - return count; - if (kstrtouint(buf, 10, &rate_limit_us)) return -EINVAL; @@ -739,9 +732,6 @@ static ssize_t iowait_boost_enable_store(struct gov_attr_set *attr_set, struct sugov_tunables *tunables = to_sugov_tunables(attr_set); bool enable; - if (task_is_booster(current)) - return count; - if (kstrtobool(buf, &enable)) return -EINVAL; @@ -1058,9 +1048,9 @@ static int sugov_init(struct cpufreq_policy *policy) } tunables->up_rate_limit_us = - CONFIG_SCHEDUTIL_UP_RATE_LIMIT; + cpufreq_policy_transition_delay_us(policy); tunables->down_rate_limit_us = - CONFIG_SCHEDUTIL_DOWN_RATE_LIMIT; + cpufreq_policy_transition_delay_us(policy); tunables->hispeed_load = DEFAULT_HISPEED_LOAD; tunables->hispeed_freq = 0; tunables->iowait_boost_enable = true;