[lkml]   [2019]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[tip: sched/urgent] sched/core: Fix compilation error when cgroup not selected
The following commit has been merged into the sched/urgent branch of tip:

Commit-ID: e3b8b6a0d12cccf772113d6b5c1875192186fbd4
Author: Qais Yousef <>
AuthorDate: Tue, 05 Nov 2019 11:22:12
Committer: Peter Zijlstra <>
CommitterDate: Fri, 08 Nov 2019 22:34:14 +01:00

sched/core: Fix compilation error when cgroup not selected

When cgroup is disabled the following compilation error was hit

kernel/sched/core.c: In function ‘uclamp_update_active_tasks’:
kernel/sched/core.c:1081:23: error: storage size of ‘it’ isn’t known
struct css_task_iter it;
kernel/sched/core.c:1084:2: error: implicit declaration of function ‘css_task_iter_start’; did you mean ‘__sg_page_iter_start’? [-Werror=implicit-function-declaration]
css_task_iter_start(css, 0, &it);
kernel/sched/core.c:1085:14: error: implicit declaration of function ‘css_task_iter_next’; did you mean ‘__sg_page_iter_next’? [-Werror=implicit-function-declaration]
while ((p = css_task_iter_next(&it))) {
kernel/sched/core.c:1091:2: error: implicit declaration of function ‘css_task_iter_end’; did you mean ‘get_task_cred’? [-Werror=implicit-function-declaration]
kernel/sched/core.c:1081:23: warning: unused variable ‘it’ [-Wunused-variable]
struct css_task_iter it;
cc1: some warnings being treated as errors
make[2]: *** [kernel/sched/core.o] Error 1

Fix by protetion uclamp_update_active_tasks() with

Fixes: babbe170e053 ("sched/uclamp: Update CPU's refcount on TG's clamp changes")
Reported-by: Randy Dunlap <>
Signed-off-by: Qais Yousef <>
Signed-off-by: Peter Zijlstra (Intel) <>
Tested-by: Randy Dunlap <>
Cc: Steven Rostedt <>
Cc: Ingo Molnar <>
Cc: Vincent Guittot <>
Cc: Patrick Bellasi <>
Cc: Mel Gorman <>
Cc: Dietmar Eggemann <>
Cc: Juri Lelli <>
Cc: Ben Segall <>
kernel/sched/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index dd05a37..afd4d80 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1073,6 +1073,7 @@ uclamp_update_active(struct task_struct *p, enum uclamp_id clamp_id)
task_rq_unlock(rq, p, &rf);

static inline void
uclamp_update_active_tasks(struct cgroup_subsys_state *css,
unsigned int clamps)
@@ -1091,7 +1092,6 @@ uclamp_update_active_tasks(struct cgroup_subsys_state *css,

static void cpu_util_update_eff(struct cgroup_subsys_state *css);
static void uclamp_update_root_tg(void)
 \ /
  Last update: 2019-11-08 22:42    [W:0.047 / U:1.100 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site