task_group
struct task_group;
struct task_group *sched_task_group;
extern struct task_group root_task_group;
struct task_group;
bool task_wants_autogroup(struct task_struct *p, struct task_group *tg)
int autogroup_path(struct task_group *tg, char *buf, int buflen)
void autogroup_free(struct task_group *tg)
struct task_group *tg;
struct task_group *tg;
extern void autogroup_free(struct task_group *tg);
static inline bool task_group_is_autogroup(struct task_group *tg)
extern bool task_wants_autogroup(struct task_struct *p, struct task_group *tg);
static inline struct task_group *
autogroup_task_group(struct task_struct *p, struct task_group *tg)
extern int autogroup_path(struct task_group *tg, char *buf, int buflen);
static inline void autogroup_free(struct task_group *tg) { }
static inline bool task_group_is_autogroup(struct task_group *tg)
static inline struct task_group *
autogroup_task_group(struct task_struct *p, struct task_group *tg)
static inline int autogroup_path(struct task_group *tg, char *buf, int buflen)
struct task_group *tg = css_tg(seq_css(sf));
static u64 throttled_time_self(struct task_group *tg)
struct task_group *tg = css_tg(seq_css(sf));
static void tg_bandwidth(struct task_group *tg,
static int tg_set_bandwidth(struct task_group *tg,
struct task_group *tg = css_tg(css);
struct task_group *tg = css_tg(css);
struct task_group *tg = css_tg(css);
struct task_group *tg = css_tg(css);
struct task_group *tg = css_tg(css);
struct task_group *tg = css_tg(seq_css(sf));
struct task_group *tg = css_tg(of_css(of));
int walk_tg_tree_from(struct task_group *from,
struct task_group *parent, *child;
int tg_nop(struct task_group *tg, void *data)
if (task_group_is_autogroup(task_group(p)))
if (task_group(p) == &root_task_group)
tg_min = task_group(p)->uclamp[UCLAMP_MIN].value;
tg_max = task_group(p)->uclamp[UCLAMP_MAX].value;
struct task_group *tg = &root_task_group;
struct task_group *tg;
struct task_group, css);
struct task_group root_task_group;
task_group_cache = KMEM_CACHE(task_group, 0);
static inline void alloc_uclamp_sched_group(struct task_group *tg,
struct task_group *parent)
static void sched_free_group(struct task_group *tg)
sched_free_group(container_of(rcu, struct task_group, rcu));
static void sched_unregister_group(struct task_group *tg)
struct task_group *sched_create_group(struct task_group *parent)
struct task_group *tg;
void sched_online_group(struct task_group *tg, struct task_group *parent)
sched_unregister_group(container_of(rhp, struct task_group, rcu));
void sched_destroy_group(struct task_group *tg)
void sched_release_group(struct task_group *tg)
struct task_group *tg;
struct task_group, css);
struct task_group *parent = css_tg(parent_css);
struct task_group *tg;
struct task_group *tg = css_tg(css);
struct task_group *parent = css_tg(css->parent);
struct task_group *tg = css_tg(css);
struct task_group *tg = css_tg(css);
struct task_group *tg = css_tg(css);
struct task_group *tg;
struct task_group *tg;
static unsigned long tg_weight(struct task_group *tg)
static int __cfs_schedulable(struct task_group *tg, u64 period, u64 runtime);
static int tg_set_cfs_bandwidth(struct task_group *tg,
static u64 tg_get_cfs_period(struct task_group *tg)
static u64 tg_get_cfs_quota(struct task_group *tg)
static u64 tg_get_cfs_burst(struct task_group *tg)
struct task_group *tg;
static u64 normalize_cfs_quota(struct task_group *tg,
static int tg_cfs_schedulable_down(struct task_group *tg, void *data)
static int __cfs_schedulable(struct task_group *tg, u64 period, u64 quota)
static void print_cfs_group_stats(struct seq_file *m, int cpu, struct task_group *tg)
static void task_group_path(struct task_group *tg, char *path, int plen)
SEQ_printf_task_group_path(m, task_group(p), " %s")
struct task_group *tg = p->sched_task_group;
static struct cgroup *tg_cgrp(struct task_group *tg)
SCX_INIT_TASK_ARGS_CGROUP(task_group(p))
void scx_tg_init(struct task_group *tg)
int scx_tg_online(struct task_group *tg)
void scx_tg_offline(struct task_group *tg)
struct cgroup *from = tg_cgrp(task_group(p));
tg_cgrp(task_group(p)));
void scx_group_set_weight(struct task_group *tg, unsigned long weight)
void scx_group_set_idle(struct task_group *tg, bool idle)
void scx_group_set_bandwidth(struct task_group *tg,
struct task_group *tg = css_tg(css);
struct task_group *tg = css_tg(css);
void scx_tg_init(struct task_group *tg);
int scx_tg_online(struct task_group *tg);
void scx_tg_offline(struct task_group *tg);
void scx_group_set_weight(struct task_group *tg, unsigned long cgrp_weight);
void scx_group_set_idle(struct task_group *tg, bool idle);
void scx_group_set_bandwidth(struct task_group *tg, u64 period_us, u64 quota_us, u64 burst_us);
static inline void scx_tg_init(struct task_group *tg) {}
static inline int scx_tg_online(struct task_group *tg) { return 0; }
static inline void scx_tg_offline(struct task_group *tg) {}
static inline void scx_group_set_weight(struct task_group *tg, unsigned long cgrp_weight) {}
static inline void scx_group_set_idle(struct task_group *tg, bool idle) {}
static inline void scx_group_set_bandwidth(struct task_group *tg, u64 period_us, u64 quota_us, u64 burst_us) {}
dst_cfs_rq = tg_cfs_rq(task_group(p), dest_cpu);
cfs_rq = tg_cfs_rq(task_group(p), cpu);
void free_fair_sched_group(struct task_group *tg)
int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent)
void online_fair_sched_group(struct task_group *tg)
void unregister_fair_sched_group(struct task_group *tg)
void init_tg_cfs_entry(struct task_group *tg, struct cfs_rq *cfs_rq,
static int __sched_group_set_shares(struct task_group *tg, unsigned long shares)
int sched_group_set_shares(struct task_group *tg, unsigned long shares)
int sched_group_set_idle(struct task_group *tg, long idle)
static int tg_is_idle(struct task_group *tg)
struct task_group *tg = cfs_rq->tg;
struct task_group *tg;
static inline int tg_is_idle(struct task_group *tg)
static inline struct cfs_bandwidth *tg_cfs_bandwidth(struct task_group *tg)
return throttled_hierarchy(tg_cfs_rq(task_group(p), dst_cpu));
static int tg_unthrottle_up(struct task_group *tg, void *data)
static int tg_throttle_down(struct task_group *tg, void *data)
static void sync_throttle(struct task_group *tg, int cpu)
struct task_group *tg;
struct task_group *tg;
static inline void sync_throttle(struct task_group *tg, int cpu) {}
static inline struct cfs_bandwidth *tg_cfs_bandwidth(struct task_group *tg)
void unregister_rt_sched_group(struct task_group *tg)
void free_rt_sched_group(struct task_group *tg)
void init_tg_rt_entry(struct task_group *tg, struct rt_rq *rt_rq,
int alloc_rt_sched_group(struct task_group *tg, struct task_group *parent)
rt_rq = task_group(p)->rt_rq[cpu];
static inline int tg_has_rt_tasks(struct task_group *tg)
struct task_group *tg;
static int tg_rt_schedulable(struct task_group *tg, void *data)
struct task_group *child;
static int __rt_schedulable(struct task_group *tg, u64 period, u64 runtime)
static int tg_set_rt_bandwidth(struct task_group *tg,
int sched_group_set_rt_runtime(struct task_group *tg, long rt_runtime_us)
long sched_group_rt_runtime(struct task_group *tg)
int sched_group_set_rt_period(struct task_group *tg, u64 rt_period_us)
long sched_group_rt_period(struct task_group *tg)
int sched_rt_can_attach(struct task_group *tg, struct task_struct *tsk)
void unregister_rt_sched_group(struct task_group *tg) { }
void free_rt_sched_group(struct task_group *tg) { }
int alloc_rt_sched_group(struct task_group *tg, struct task_group *parent)
typedef struct task_group *rt_rq_iter_t;
static inline struct task_group *next_task_group(struct task_group *tg)
typeof(struct task_group), list);
return container_of(rt_b, struct task_group, rt_bandwidth)->rt_rq[cpu];
static inline struct task_group *task_group(struct task_struct *p)
static inline struct cfs_rq *tg_cfs_rq(struct task_group *tg, int cpu)
static inline struct sched_entity *tg_se(struct task_group *tg, int cpu)
struct task_group *tg = task_group(p);
static inline struct task_group *task_group(struct task_struct *p)
struct task_group *parent;
typedef int (*tg_visitor)(struct task_group *, void *);
extern int walk_tg_tree_from(struct task_group *from,
static inline struct task_group *css_tg(struct cgroup_subsys_state *css)
return css ? container_of(css, struct task_group, css) : NULL;
extern int tg_nop(struct task_group *tg, void *data);
extern void free_fair_sched_group(struct task_group *tg);
extern int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent);
extern void online_fair_sched_group(struct task_group *tg);
extern void unregister_fair_sched_group(struct task_group *tg);
static inline void free_fair_sched_group(struct task_group *tg) { }
static inline int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent)
static inline void online_fair_sched_group(struct task_group *tg) { }
static inline void unregister_fair_sched_group(struct task_group *tg) { }
extern void init_tg_cfs_entry(struct task_group *tg, struct cfs_rq *cfs_rq,
extern void init_tg_rt_entry(struct task_group *tg, struct rt_rq *rt_rq,
extern int sched_group_set_rt_runtime(struct task_group *tg, long rt_runtime_us);
extern int sched_group_set_rt_period(struct task_group *tg, u64 rt_period_us);
extern long sched_group_rt_runtime(struct task_group *tg);
extern long sched_group_rt_period(struct task_group *tg);
extern int sched_rt_can_attach(struct task_group *tg, struct task_struct *tsk);
extern struct task_group *sched_create_group(struct task_group *parent);
extern void sched_online_group(struct task_group *tg,
struct task_group *parent);
extern void sched_destroy_group(struct task_group *tg);
extern void sched_release_group(struct task_group *tg);
extern int sched_group_set_shares(struct task_group *tg, unsigned long shares);
extern int sched_group_set_idle(struct task_group *tg, long idle);
static inline int sched_group_set_shares(struct task_group *tg, unsigned long shares) { return 0; }
static inline int sched_group_set_idle(struct task_group *tg, long idle) { return 0; }
extern void unregister_rt_sched_group(struct task_group *tg);
extern void free_rt_sched_group(struct task_group *tg);
extern int alloc_rt_sched_group(struct task_group *tg, struct task_group *parent);
struct task_group *tg; /* Group that "owns" this runqueue */
struct task_group *tg; /* this tg has "this" rt_rq on given CPU for runnable entities */
task_group(p)->rt_bandwidth.rt_runtime == 0 &&
!task_group_is_autogroup(task_group(p))) {