mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
Revert "ANDROID: cgroup: Add android_rvh_cgroup_force_kthread_migration"
This reverts commit d4f032e36b as it
causes merge conflicts in 6.0-rc2.
If it is still needed in an Android kernel release, it can be added back
into a release-specific branch at a later point in time.
Bug: 184594949
Cc: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
Cc: Shaleen Agrawal <shalagra@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5d2ff43a1e4e14308c41cfd5d2d752836a134ae0
This commit is contained in:
@@ -110,7 +110,6 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ptype_head);
|
|||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_allow_domain_state);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_allow_domain_state);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpuidle_psci_enter);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpuidle_psci_enter);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpuidle_psci_exit);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpuidle_psci_exit);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_cgroup_force_kthread_migration);
|
|
||||||
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);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_replace_next_task_fair);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_replace_next_task_fair);
|
||||||
|
|||||||
@@ -17,9 +17,6 @@ struct cgroup_taskset;
|
|||||||
DECLARE_HOOK(android_vh_cgroup_attach,
|
DECLARE_HOOK(android_vh_cgroup_attach,
|
||||||
TP_PROTO(struct cgroup_subsys *ss, struct cgroup_taskset *tset),
|
TP_PROTO(struct cgroup_subsys *ss, struct cgroup_taskset *tset),
|
||||||
TP_ARGS(ss, tset))
|
TP_ARGS(ss, tset))
|
||||||
DECLARE_RESTRICTED_HOOK(android_rvh_cgroup_force_kthread_migration,
|
|
||||||
TP_PROTO(struct task_struct *tsk, struct cgroup *dst_cgrp, bool *force_migration),
|
|
||||||
TP_ARGS(tsk, dst_cgrp, force_migration), 1);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <trace/define_trace.h>
|
#include <trace/define_trace.h>
|
||||||
|
|||||||
@@ -251,8 +251,7 @@ int cgroup_migrate(struct task_struct *leader, bool threadgroup,
|
|||||||
int cgroup_attach_task(struct cgroup *dst_cgrp, struct task_struct *leader,
|
int cgroup_attach_task(struct cgroup *dst_cgrp, struct task_struct *leader,
|
||||||
bool threadgroup);
|
bool threadgroup);
|
||||||
struct task_struct *cgroup_procs_write_start(char *buf, bool threadgroup,
|
struct task_struct *cgroup_procs_write_start(char *buf, bool threadgroup,
|
||||||
bool *locked,
|
bool *locked)
|
||||||
struct cgroup *dst_cgrp);
|
|
||||||
__acquires(&cgroup_threadgroup_rwsem);
|
__acquires(&cgroup_threadgroup_rwsem);
|
||||||
void cgroup_procs_write_finish(struct task_struct *task, bool locked)
|
void cgroup_procs_write_finish(struct task_struct *task, bool locked)
|
||||||
__releases(&cgroup_threadgroup_rwsem);
|
__releases(&cgroup_threadgroup_rwsem);
|
||||||
|
|||||||
@@ -501,7 +501,7 @@ static ssize_t __cgroup1_procs_write(struct kernfs_open_file *of,
|
|||||||
if (!cgrp)
|
if (!cgrp)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
task = cgroup_procs_write_start(buf, threadgroup, &locked, cgrp);
|
task = cgroup_procs_write_start(buf, threadgroup, &locked);
|
||||||
ret = PTR_ERR_OR_ZERO(task);
|
ret = PTR_ERR_OR_ZERO(task);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out_unlock;
|
goto out_unlock;
|
||||||
|
|||||||
@@ -2847,13 +2847,11 @@ int cgroup_attach_task(struct cgroup *dst_cgrp, struct task_struct *leader,
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct task_struct *cgroup_procs_write_start(char *buf, bool threadgroup,
|
struct task_struct *cgroup_procs_write_start(char *buf, bool threadgroup,
|
||||||
bool *locked,
|
bool *locked)
|
||||||
struct cgroup *dst_cgrp)
|
|
||||||
__acquires(&cgroup_threadgroup_rwsem)
|
__acquires(&cgroup_threadgroup_rwsem)
|
||||||
{
|
{
|
||||||
struct task_struct *tsk;
|
struct task_struct *tsk;
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
bool force_migration = false;
|
|
||||||
|
|
||||||
if (kstrtoint(strstrip(buf), 0, &pid) || pid < 0)
|
if (kstrtoint(strstrip(buf), 0, &pid) || pid < 0)
|
||||||
return ERR_PTR(-EINVAL);
|
return ERR_PTR(-EINVAL);
|
||||||
@@ -2888,16 +2886,13 @@ struct task_struct *cgroup_procs_write_start(char *buf, bool threadgroup,
|
|||||||
if (threadgroup)
|
if (threadgroup)
|
||||||
tsk = tsk->group_leader;
|
tsk = tsk->group_leader;
|
||||||
|
|
||||||
if (tsk->flags & PF_KTHREAD)
|
|
||||||
trace_android_rvh_cgroup_force_kthread_migration(tsk, dst_cgrp, &force_migration);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* kthreads may acquire PF_NO_SETAFFINITY during initialization.
|
* kthreads may acquire PF_NO_SETAFFINITY during initialization.
|
||||||
* If userland migrates such a kthread to a non-root cgroup, it can
|
* If userland migrates such a kthread to a non-root cgroup, it can
|
||||||
* become trapped in a cpuset, or RT kthread may be born in a
|
* become trapped in a cpuset, or RT kthread may be born in a
|
||||||
* cgroup with no rt_runtime allocated. Just say no.
|
* cgroup with no rt_runtime allocated. Just say no.
|
||||||
*/
|
*/
|
||||||
if (!force_migration && (tsk->no_cgroup_migration || (tsk->flags & PF_NO_SETAFFINITY))) {
|
if (tsk->no_cgroup_migration || (tsk->flags & PF_NO_SETAFFINITY)) {
|
||||||
tsk = ERR_PTR(-EINVAL);
|
tsk = ERR_PTR(-EINVAL);
|
||||||
goto out_unlock_threadgroup;
|
goto out_unlock_threadgroup;
|
||||||
}
|
}
|
||||||
@@ -4989,7 +4984,7 @@ static ssize_t __cgroup_procs_write(struct kernfs_open_file *of, char *buf,
|
|||||||
if (!dst_cgrp)
|
if (!dst_cgrp)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
task = cgroup_procs_write_start(buf, threadgroup, &locked, dst_cgrp);
|
task = cgroup_procs_write_start(buf, threadgroup, &locked);
|
||||||
ret = PTR_ERR_OR_ZERO(task);
|
ret = PTR_ERR_OR_ZERO(task);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out_unlock;
|
goto out_unlock;
|
||||||
|
|||||||
Reference in New Issue
Block a user