@@ -4058,32 +4058,32 @@ static bool scx_cgroup_enabled;
40584058
40594059void scx_tg_init (struct task_group * tg )
40604060{
4061- tg -> scx_weight = CGROUP_WEIGHT_DFL ;
4061+ tg -> scx . weight = CGROUP_WEIGHT_DFL ;
40624062}
40634063
40644064int scx_tg_online (struct task_group * tg )
40654065{
40664066 struct scx_sched * sch = scx_root ;
40674067 int ret = 0 ;
40684068
4069- WARN_ON_ONCE (tg -> scx_flags & (SCX_TG_ONLINE | SCX_TG_INITED ));
4069+ WARN_ON_ONCE (tg -> scx . flags & (SCX_TG_ONLINE | SCX_TG_INITED ));
40704070
40714071 percpu_down_read (& scx_cgroup_rwsem );
40724072
40734073 if (scx_cgroup_enabled ) {
40744074 if (SCX_HAS_OP (sch , cgroup_init )) {
40754075 struct scx_cgroup_init_args args =
4076- { .weight = tg -> scx_weight };
4076+ { .weight = tg -> scx . weight };
40774077
40784078 ret = SCX_CALL_OP_RET (sch , SCX_KF_UNLOCKED , cgroup_init ,
40794079 NULL , tg -> css .cgroup , & args );
40804080 if (ret )
40814081 ret = ops_sanitize_err (sch , "cgroup_init" , ret );
40824082 }
40834083 if (ret == 0 )
4084- tg -> scx_flags |= SCX_TG_ONLINE | SCX_TG_INITED ;
4084+ tg -> scx . flags |= SCX_TG_ONLINE | SCX_TG_INITED ;
40854085 } else {
4086- tg -> scx_flags |= SCX_TG_ONLINE ;
4086+ tg -> scx . flags |= SCX_TG_ONLINE ;
40874087 }
40884088
40894089 percpu_up_read (& scx_cgroup_rwsem );
@@ -4094,15 +4094,15 @@ void scx_tg_offline(struct task_group *tg)
40944094{
40954095 struct scx_sched * sch = scx_root ;
40964096
4097- WARN_ON_ONCE (!(tg -> scx_flags & SCX_TG_ONLINE ));
4097+ WARN_ON_ONCE (!(tg -> scx . flags & SCX_TG_ONLINE ));
40984098
40994099 percpu_down_read (& scx_cgroup_rwsem );
41004100
41014101 if (scx_cgroup_enabled && SCX_HAS_OP (sch , cgroup_exit ) &&
4102- (tg -> scx_flags & SCX_TG_INITED ))
4102+ (tg -> scx . flags & SCX_TG_INITED ))
41034103 SCX_CALL_OP (sch , SCX_KF_UNLOCKED , cgroup_exit , NULL ,
41044104 tg -> css .cgroup );
4105- tg -> scx_flags &= ~(SCX_TG_ONLINE | SCX_TG_INITED );
4105+ tg -> scx . flags &= ~(SCX_TG_ONLINE | SCX_TG_INITED );
41064106
41074107 percpu_up_read (& scx_cgroup_rwsem );
41084108}
@@ -4211,11 +4211,11 @@ void scx_group_set_weight(struct task_group *tg, unsigned long weight)
42114211 percpu_down_read (& scx_cgroup_rwsem );
42124212
42134213 if (scx_cgroup_enabled && SCX_HAS_OP (sch , cgroup_set_weight ) &&
4214- tg -> scx_weight != weight )
4214+ tg -> scx . weight != weight )
42154215 SCX_CALL_OP (sch , SCX_KF_UNLOCKED , cgroup_set_weight , NULL ,
42164216 tg_cgrp (tg ), weight );
42174217
4218- tg -> scx_weight = weight ;
4218+ tg -> scx . weight = weight ;
42194219
42204220 percpu_up_read (& scx_cgroup_rwsem );
42214221}
@@ -4366,9 +4366,9 @@ static void scx_cgroup_exit(struct scx_sched *sch)
43664366 css_for_each_descendant_post (css , & root_task_group .css ) {
43674367 struct task_group * tg = css_tg (css );
43684368
4369- if (!(tg -> scx_flags & SCX_TG_INITED ))
4369+ if (!(tg -> scx . flags & SCX_TG_INITED ))
43704370 continue ;
4371- tg -> scx_flags &= ~SCX_TG_INITED ;
4371+ tg -> scx . flags &= ~SCX_TG_INITED ;
43724372
43734373 if (!sch -> ops .cgroup_exit )
43744374 continue ;
@@ -4400,14 +4400,14 @@ static int scx_cgroup_init(struct scx_sched *sch)
44004400 rcu_read_lock ();
44014401 css_for_each_descendant_pre (css , & root_task_group .css ) {
44024402 struct task_group * tg = css_tg (css );
4403- struct scx_cgroup_init_args args = { .weight = tg -> scx_weight };
4403+ struct scx_cgroup_init_args args = { .weight = tg -> scx . weight };
44044404
4405- if ((tg -> scx_flags &
4405+ if ((tg -> scx . flags &
44064406 (SCX_TG_ONLINE | SCX_TG_INITED )) != SCX_TG_ONLINE )
44074407 continue ;
44084408
44094409 if (!sch -> ops .cgroup_init ) {
4410- tg -> scx_flags |= SCX_TG_INITED ;
4410+ tg -> scx . flags |= SCX_TG_INITED ;
44114411 continue ;
44124412 }
44134413
@@ -4422,7 +4422,7 @@ static int scx_cgroup_init(struct scx_sched *sch)
44224422 scx_error (sch , "ops.cgroup_init() failed (%d)" , ret );
44234423 return ret ;
44244424 }
4425- tg -> scx_flags |= SCX_TG_INITED ;
4425+ tg -> scx . flags |= SCX_TG_INITED ;
44264426
44274427 rcu_read_lock ();
44284428 css_put (css );
0 commit comments