Skip to content
Snippets Groups Projects
Commit 72b3422d authored by Xia Fukun's avatar Xia Fukun Committed by Yongqiang Liu
Browse files

init/Kconfig: Add SMP to the dependencies of QOS_SCHED

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5UPB0


CVE: NA

------------------------------------------------------------

After CONFIG_SMP is disabled during kernel compilation,
CONFIG_QOS_SCHED is not disabled.
As a result, the following error occurs:

kernel/sched/fair.c: In function ‘check_qos_cfs_rq’:
kernel/sched/fair.c:7324:4: error: implicit declaration of function
‘sched_idle_cpu’; did you mean ‘sched_idle_rq’?
[-Werror=implicit-function-declaration]
 7324 |   !sched_idle_cpu(smp_processor_id()) &&
      |    ^~~~~~~~~~~~~~
./include/linux/compiler.h:78:42: note: in definition of macro ‘unlikely’
   78 | # define unlikely(x) __builtin_expect(!!(x), 0)
      |                                          ^
  CC      mm/highmem.o
kernel/sched/fair.c: In function ‘pick_next_task_fair’:
kernel/sched/fair.c:7599:43: error: ‘struct rq’ has no member named ‘online’
 7599 |   if (cfs_rq->idle_h_nr_running != 0 && rq->online)
      |                                           ^~
  AR      arch/x86/mm/pat/built-in.a
  CC      kernel/sched/stats.o
kernel/sched/fair.c:7790:7: error: ‘struct rq’ has no member named ‘idle_stamp’;
did you mean ‘idle_state’?
 7790 |   rq->idle_stamp = 0;
      |       ^~~~~~~~~~
      |       idle_state

This is because the definitions of the corresponding functions
and variables depend on the SMP configuration.
So add SMP to the dependencies of QOS_SCHED.

Signed-off-by: default avatarXia Fukun <xiafukun@huawei.com>
Reviewed-by: default avatarZhang Qiao <zhangqiao22@huawei.com>
Reviewed-by: default avatarzheng zucheng <zhengzucheng@huawei.com>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
parent 6d5d324d
No related branches found
No related tags found
No related merge requests found
......@@ -791,6 +791,7 @@ config QOS_SCHED
bool "Qos task scheduling"
depends on CGROUP_SCHED
depends on CFS_BANDWIDTH
depends on SMP
default n
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment