Skip to content

Commit 7ebd84d

Browse files
yuliao0214htejun
authored andcommitted
sched: Put task_group::idle under CONFIG_GROUP_SCHED_WEIGHT
When build with CONFIG_GROUP_SCHED_WEIGHT && !CONFIG_FAIR_GROUP_SCHED, the idle member is not defined: kernel/sched/ext.c:3701:16: error: 'struct task_group' has no member named 'idle' 3701 | if (!tg->idle) | ^~ Fix this by putting 'idle' under new CONFIG_GROUP_SCHED_WEIGHT. tj: Move idle field upward to avoid breaking up CONFIG_FAIR_GROUP_SCHED block. Fixes: e179e80 ("sched: Introduce CONFIG_GROUP_SCHED_WEIGHT") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Yu Liao <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent bdeb868 commit 7ebd84d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

kernel/sched/sched.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -432,16 +432,17 @@ struct cfs_bandwidth {
432432
struct task_group {
433433
struct cgroup_subsys_state css;
434434

435+
#ifdef CONFIG_GROUP_SCHED_WEIGHT
436+
/* A positive value indicates that this is a SCHED_IDLE group. */
437+
int idle;
438+
#endif
439+
435440
#ifdef CONFIG_FAIR_GROUP_SCHED
436441
/* schedulable entities of this group on each CPU */
437442
struct sched_entity **se;
438443
/* runqueue "owned" by this group on each CPU */
439444
struct cfs_rq **cfs_rq;
440445
unsigned long shares;
441-
442-
/* A positive value indicates that this is a SCHED_IDLE group. */
443-
int idle;
444-
445446
#ifdef CONFIG_SMP
446447
/*
447448
* load_avg can be heavily contended at clock tick time, so put

0 commit comments

Comments
 (0)