diff options
author | Chengming Zhou <zhouchengming@bytedance.com> | 2022-08-18 14:47:58 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2022-08-23 11:01:17 +0200 |
commit | 39c4261191bf05e7eb310f852980a6d0afe5582a (patch) | |
tree | e9ab63aedb6a7ebeff13416bccdb243a5649c0d3 /kernel/sched/sched.h | |
parent | sched/fair: Maintain task se depth in set_task_rq() (diff) | |
download | linux-39c4261191bf05e7eb310f852980a6d0afe5582a.tar.xz linux-39c4261191bf05e7eb310f852980a6d0afe5582a.zip |
sched/fair: Remove redundant cpu_cgrp_subsys->fork()
We use cpu_cgrp_subsys->fork() to set task group for the new fair task
in cgroup_post_fork().
Since commit b1e8206582f9 ("sched: Fix yet more sched_fork() races")
has already set_task_rq() for the new fair task in sched_cgroup_fork(),
so cpu_cgrp_subsys->fork() can be removed.
cgroup_can_fork() --> pin parent's sched_task_group
sched_cgroup_fork()
__set_task_cpu()
set_task_rq()
cgroup_post_fork()
ss->fork() := cpu_cgroup_fork()
sched_change_group(..., TASK_SET_GROUP)
task_set_group_fair()
set_task_rq() --> can be removed
After this patch's change, task_change_group_fair() only need to
care about task cgroup migration, make the code much simplier.
Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Link: https://lore.kernel.org/r/20220818124805.601-3-zhouchengming@bytedance.com
Diffstat (limited to 'kernel/sched/sched.h')
-rw-r--r-- | kernel/sched/sched.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 4c4822141026..74130a69d365 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -2193,11 +2193,8 @@ struct sched_class { void (*update_curr)(struct rq *rq); -#define TASK_SET_GROUP 0 -#define TASK_MOVE_GROUP 1 - #ifdef CONFIG_FAIR_GROUP_SCHED - void (*task_change_group)(struct task_struct *p, int type); + void (*task_change_group)(struct task_struct *p); #endif }; |