treewide: remove blocker changes
Squashed commit of the following: commit 811cf86e5630b6683e461e5ee456d4ffe2eb36b2 Author: kondors1995 <normandija1945@gmail.com> Date: Wed Sep 9 07:21:29 2020 +0000 Revert "cpufreq: schedutil: Apply init protection to default configuration options" This reverts commit4ecb29c3df. commit b541ba1f2b0543761d962d36380f04139becf16a Author: kondors1995 <normandija1945@gmail.com> Date: Wed Sep 9 07:08:13 2020 +0000 Revert "kernel: introduce CPUSets Assist" This reverts commitc45e65572c. commit 886a836d499dd2a19b93f08be7e68f6f6baa2e6b Author: kondors1995 <normandija1945@gmail.com> Date: Wed Sep 9 07:08:03 2020 +0000 Revert "cpuset: Refactor cpuset assist code" This reverts commit04eada3a89. commit 9bdcbf7576aabdea6639e98d576cf63f8804f6d6 Author: kondors1995 <normandija1945@gmail.com> Date: Wed Sep 9 07:07:57 2020 +0000 Revert "cpuset: Move cpuset override values to Kconfig" This reverts commitedbf67e199. commit f9a4600e0bc63e7ea2bdc3a23ef3e1e1848f5d56 Author: kondors1995 <normandija1945@gmail.com> Date: Wed Sep 9 07:07:51 2020 +0000 Revert "cpuset: guard CPUSETS_ASSISTANT code properly" This reverts commit068236c13a. commit adf6f1f9c99161593af8c88f9875730823ece72c Author: kondors1995 <normandija1945@gmail.com> Date: Wed Sep 9 07:06:39 2020 +0000 Revert "exec: Add node tampering blacklist function" This reverts commitce392dfd95. commit a8c8bf6cd51e6c1eaf2c533604aa9672ea3e605f Author: kondors1995 <normandija1945@gmail.com> Date: Wed Sep 9 07:06:32 2020 +0000 Revert "exec: Extend task_is_booster check to cover OxygenOS userspace HALs" This reverts commit9e18f0f556. commit 49f0c5e402345ec5d25a46a573de09d967a3d298 Author: kondors1995 <normandija1945@gmail.com> Date: Wed Sep 9 07:06:25 2020 +0000 Revert "exec: Add power@2.0 and IOP to tampering blacklist" This reverts commita94abe8d8e. commit df04db7ce215e1b90559bdfd59a7cc7b0a3128c1 Author: kondors1995 <normandija1945@gmail.com> Date: Wed Sep 9 07:02:19 2020 +0000 Revert "cpufreq: Kill userspace CPU boosting entirely" This reverts commit3588cb8f72. commit b56ca8721a22b3f0ce870485084578de6d2e4bf1 Author: kondors1995 <normandija1945@gmail.com> Date: Wed Sep 9 07:01:59 2020 +0000 Revert "cpufreq: Allow configuring default minimum frequencies in Kconfig" This reverts commitc52d0b68a4. commit 3683571e22dec49b2e9585c9bf67e26c3f90c62d Author: kondors1995 <normandija1945@gmail.com> Date: Wed Sep 9 07:01:52 2020 +0000 Revert "cpufreq: schedutil: Expose default rate-limits as config options" This reverts commit8e639c1f3f.
This commit is contained in:
@@ -230,24 +230,6 @@ config CPU_FREQ_GOV_SCHEDUTIL
|
|||||||
|
|
||||||
If in doubt, say N.
|
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
|
config CPU_FREQ_GOV_INTERACTIVE
|
||||||
tristate "'interactive' cpufreq policy governor"
|
tristate "'interactive' cpufreq policy governor"
|
||||||
depends on CPU_FREQ
|
depends on CPU_FREQ
|
||||||
@@ -268,33 +250,6 @@ config CPU_FREQ_GOV_INTERACTIVE
|
|||||||
|
|
||||||
If in doubt, say N.
|
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"
|
comment "CPU frequency scaling drivers"
|
||||||
|
|
||||||
config CPUFREQ_DT
|
config CPUFREQ_DT
|
||||||
|
|||||||
@@ -727,9 +727,6 @@ static ssize_t store_##file_name \
|
|||||||
int ret, temp; \
|
int ret, temp; \
|
||||||
struct cpufreq_policy new_policy; \
|
struct cpufreq_policy new_policy; \
|
||||||
\
|
\
|
||||||
if (&policy->object == &policy->min) \
|
|
||||||
return count; \
|
|
||||||
\
|
|
||||||
memcpy(&new_policy, policy, sizeof(*policy)); \
|
memcpy(&new_policy, policy, sizeof(*policy)); \
|
||||||
new_policy.min = policy->user_policy.min; \
|
new_policy.min = policy->user_policy.min; \
|
||||||
new_policy.max = policy->user_policy.max; \
|
new_policy.max = policy->user_policy.max; \
|
||||||
|
|||||||
@@ -61,19 +61,6 @@ int cpufreq_frequency_table_cpuinfo(struct cpufreq_policy *policy,
|
|||||||
if (max_freq > cpuinfo_max_freq_cached)
|
if (max_freq > cpuinfo_max_freq_cached)
|
||||||
cpuinfo_max_freq_cached = max_freq;
|
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)
|
if (policy->min == ~0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -148,19 +148,4 @@ extern int do_execveat(int, struct filename *,
|
|||||||
const char __user * const __user *,
|
const char __user * const __user *,
|
||||||
int);
|
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 */
|
#endif /* _LINUX_BINFMTS_H */
|
||||||
|
|||||||
55
init/Kconfig
55
init/Kconfig
@@ -1123,61 +1123,6 @@ config SCHED_TUNE
|
|||||||
|
|
||||||
If unsure, say N.
|
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
|
config DEFAULT_USE_ENERGY_AWARE
|
||||||
bool "Default to enabling the Energy Aware Scheduler feature"
|
bool "Default to enabling the Energy Aware Scheduler feature"
|
||||||
default n
|
default n
|
||||||
|
|||||||
@@ -57,7 +57,6 @@
|
|||||||
#include <linux/backing-dev.h>
|
#include <linux/backing-dev.h>
|
||||||
#include <linux/sort.h>
|
#include <linux/sort.h>
|
||||||
#include <linux/oom.h>
|
#include <linux/oom.h>
|
||||||
#include <linux/binfmts.h>
|
|
||||||
|
|
||||||
#include <linux/uaccess.h>
|
#include <linux/uaccess.h>
|
||||||
#include <linux/atomic.h>
|
#include <linux/atomic.h>
|
||||||
@@ -138,13 +137,6 @@ struct cpuset {
|
|||||||
int relax_domain_level;
|
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)
|
static inline struct cpuset *css_cs(struct cgroup_subsys_state *css)
|
||||||
{
|
{
|
||||||
return css ? container_of(css, struct cpuset, css) : NULL;
|
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;
|
struct cpuset *trialcs;
|
||||||
int retval = -ENODEV;
|
int retval = -ENODEV;
|
||||||
|
|
||||||
|
buf = strstrip(buf);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CPU or memory hotunplug may leave @cs w/o any execution
|
* CPU or memory hotunplug may leave @cs w/o any execution
|
||||||
* resources, in which case the hotplug code asynchronously updates
|
* resources, in which case the hotplug code asynchronously updates
|
||||||
@@ -1775,48 +1769,6 @@ out_unlock:
|
|||||||
return retval ?: nbytes;
|
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
|
* 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
|
* buffer large enough to hold the entire map. If read in smaller
|
||||||
@@ -1909,7 +1861,7 @@ static struct cftype files[] = {
|
|||||||
{
|
{
|
||||||
.name = "cpus",
|
.name = "cpus",
|
||||||
.seq_show = cpuset_common_seq_show,
|
.seq_show = cpuset_common_seq_show,
|
||||||
.write = cpuset_write_resmask_wrapper,
|
.write = cpuset_write_resmask,
|
||||||
.max_write_len = (100U + 6 * NR_CPUS),
|
.max_write_len = (100U + 6 * NR_CPUS),
|
||||||
.private = FILE_CPULIST,
|
.private = FILE_CPULIST,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||||
|
|
||||||
#include <linux/binfmts.h>
|
|
||||||
#include <linux/cpufreq.h>
|
#include <linux/cpufreq.h>
|
||||||
#include <linux/kthread.h>
|
#include <linux/kthread.h>
|
||||||
#include <uapi/linux/sched/types.h>
|
#include <uapi/linux/sched/types.h>
|
||||||
@@ -686,9 +685,6 @@ static ssize_t up_rate_limit_us_store(struct gov_attr_set *attr_set,
|
|||||||
struct sugov_policy *sg_policy;
|
struct sugov_policy *sg_policy;
|
||||||
unsigned int rate_limit_us;
|
unsigned int rate_limit_us;
|
||||||
|
|
||||||
if (task_is_booster(current))
|
|
||||||
return count;
|
|
||||||
|
|
||||||
if (kstrtouint(buf, 10, &rate_limit_us))
|
if (kstrtouint(buf, 10, &rate_limit_us))
|
||||||
return -EINVAL;
|
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;
|
struct sugov_policy *sg_policy;
|
||||||
unsigned int rate_limit_us;
|
unsigned int rate_limit_us;
|
||||||
|
|
||||||
if (task_is_booster(current))
|
|
||||||
return count;
|
|
||||||
|
|
||||||
if (kstrtouint(buf, 10, &rate_limit_us))
|
if (kstrtouint(buf, 10, &rate_limit_us))
|
||||||
return -EINVAL;
|
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);
|
struct sugov_tunables *tunables = to_sugov_tunables(attr_set);
|
||||||
bool enable;
|
bool enable;
|
||||||
|
|
||||||
if (task_is_booster(current))
|
|
||||||
return count;
|
|
||||||
|
|
||||||
if (kstrtobool(buf, &enable))
|
if (kstrtobool(buf, &enable))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
@@ -1058,9 +1048,9 @@ static int sugov_init(struct cpufreq_policy *policy)
|
|||||||
}
|
}
|
||||||
|
|
||||||
tunables->up_rate_limit_us =
|
tunables->up_rate_limit_us =
|
||||||
CONFIG_SCHEDUTIL_UP_RATE_LIMIT;
|
cpufreq_policy_transition_delay_us(policy);
|
||||||
tunables->down_rate_limit_us =
|
tunables->down_rate_limit_us =
|
||||||
CONFIG_SCHEDUTIL_DOWN_RATE_LIMIT;
|
cpufreq_policy_transition_delay_us(policy);
|
||||||
tunables->hispeed_load = DEFAULT_HISPEED_LOAD;
|
tunables->hispeed_load = DEFAULT_HISPEED_LOAD;
|
||||||
tunables->hispeed_freq = 0;
|
tunables->hispeed_freq = 0;
|
||||||
tunables->iowait_boost_enable = true;
|
tunables->iowait_boost_enable = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user