Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

sched: Expose css_tg()

A new BPF extensible sched_class will use css_tg() in the init and exit
paths to visit all task_groups by walking cgroups.

v4: __setscheduler_prio() is already exposed. Dropped from this patch.

v3: Dropped SCHED_CHANGE_BLOCK() as upstream is adding more generic cleanup
mechanism.

v2: Expose SCHED_CHANGE_BLOCK() too and update the description.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: David Vernet <dvernet@meta.com>
Acked-by: Josh Don <joshdon@google.com>
Acked-by: Hao Luo <haoluo@google.com>
Acked-by: Barret Rhoden <brho@google.com>

+5 -5
-5
kernel/sched/core.c
··· 8942 8942 } 8943 8943 } 8944 8944 8945 - static inline struct task_group *css_tg(struct cgroup_subsys_state *css) 8946 - { 8947 - return css ? container_of(css, struct task_group, css) : NULL; 8948 - } 8949 - 8950 8945 static struct cgroup_subsys_state * 8951 8946 cpu_cgroup_css_alloc(struct cgroup_subsys_state *parent_css) 8952 8947 {
+5
kernel/sched/sched.h
··· 514 514 return walk_tg_tree_from(&root_task_group, down, up, data); 515 515 } 516 516 517 + static inline struct task_group *css_tg(struct cgroup_subsys_state *css) 518 + { 519 + return css ? container_of(css, struct task_group, css) : NULL; 520 + } 521 + 517 522 extern int tg_nop(struct task_group *tg, void *data); 518 523 519 524 #ifdef CONFIG_FAIR_GROUP_SCHED