Revert "ANDROID: sched/cpuset: Add vendor hook to change tasks affinity"

This reverts commit 4d1ac6a160 as it
causes merge conflicts, and build conflicts in 6.1-rc1 due to upstream
cpuset changes.  If this is needed in 6.1, it will have to be reworked
and forward ported in a different way as the structure information has
been changed in 6.1.

Bug: 174125747
Cc: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iedc328c351830b8b338efb4642aac656b00c5a2a
This commit is contained in:
Greg Kroah-Hartman
2022-10-12 11:36:20 +02:00
parent 3fc3fe757f
commit 034ddf86f7
3 changed files with 2 additions and 22 deletions

View File

@@ -128,11 +128,6 @@ DECLARE_RESTRICTED_HOOK(android_rvh_sched_getaffinity,
TP_PROTO(struct task_struct *p, struct cpumask *in_mask), TP_PROTO(struct task_struct *p, struct cpumask *in_mask),
TP_ARGS(p, in_mask), 1); TP_ARGS(p, in_mask), 1);
DECLARE_RESTRICTED_HOOK(android_rvh_update_cpus_allowed,
TP_PROTO(struct task_struct *p, cpumask_var_t cpus_requested,
const struct cpumask *new_mask, int *ret),
TP_ARGS(p, cpus_requested, new_mask, ret), 1);
DECLARE_RESTRICTED_HOOK(android_rvh_sched_fork_init, DECLARE_RESTRICTED_HOOK(android_rvh_sched_fork_init,
TP_PROTO(struct task_struct *p), TP_PROTO(struct task_struct *p),
TP_ARGS(p), 1); TP_ARGS(p), 1);

View File

@@ -66,8 +66,6 @@
#include <linux/cgroup.h> #include <linux/cgroup.h>
#include <linux/wait.h> #include <linux/wait.h>
#include <trace/hooks/sched.h>
DEFINE_STATIC_KEY_FALSE(cpusets_pre_enable_key); DEFINE_STATIC_KEY_FALSE(cpusets_pre_enable_key);
DEFINE_STATIC_KEY_FALSE(cpusets_enabled_key); DEFINE_STATIC_KEY_FALSE(cpusets_enabled_key);
@@ -1106,18 +1104,6 @@ void rebuild_sched_domains(void)
cpus_read_unlock(); cpus_read_unlock();
} }
static int update_cpus_allowed(struct cpuset *cs, struct task_struct *p,
const struct cpumask *new_mask)
{
int ret = -EINVAL;
trace_android_rvh_update_cpus_allowed(p, cs->cpus_requested, new_mask, &ret);
if (!ret)
return ret;
return set_cpus_allowed_ptr(p, new_mask);
}
/** /**
* update_tasks_cpumask - Update the cpumasks of tasks in the cpuset. * update_tasks_cpumask - Update the cpumasks of tasks in the cpuset.
* @cs: the cpuset in which each task's cpus_allowed mask needs to be changed * @cs: the cpuset in which each task's cpus_allowed mask needs to be changed
@@ -1133,7 +1119,7 @@ static void update_tasks_cpumask(struct cpuset *cs)
css_task_iter_start(&cs->css, 0, &it); css_task_iter_start(&cs->css, 0, &it);
while ((task = css_task_iter_next(&it))) while ((task = css_task_iter_next(&it)))
update_cpus_allowed(cs, task, cs->effective_cpus); set_cpus_allowed_ptr(task, cs->effective_cpus);
css_task_iter_end(&it); css_task_iter_end(&it);
} }
@@ -2306,7 +2292,7 @@ static void cpuset_attach(struct cgroup_taskset *tset)
* can_attach beforehand should guarantee that this doesn't * can_attach beforehand should guarantee that this doesn't
* fail. TODO: have a better way to handle failure here * fail. TODO: have a better way to handle failure here
*/ */
WARN_ON_ONCE(update_cpus_allowed(cs, task, cpus_attach)); WARN_ON_ONCE(set_cpus_allowed_ptr(task, cpus_attach));
cpuset_change_task_nodemask(task, &cpuset_attach_nodemask_to); cpuset_change_task_nodemask(task, &cpuset_attach_nodemask_to);
cpuset_update_task_spread_flag(cs, task); cpuset_update_task_spread_flag(cs, task);

View File

@@ -35,7 +35,6 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_find_busiest_queue);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_migrate_queued_task); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_migrate_queued_task);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_cpu_overutilized); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_cpu_overutilized);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_sched_setaffinity); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_sched_setaffinity);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_update_cpus_allowed);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_build_sched_domains); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_build_sched_domains);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_check_preempt_tick); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_check_preempt_tick);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_check_preempt_wakeup_ignore); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_check_preempt_wakeup_ignore);