Core BSP 분석/리눅스 커널 핵심 분석
[LinuxKernel] Tip: How to disable CONFIG_SCHED_INFO
AustinKim
2023. 5. 7. 16:48
<v5.4>
By default kernel is configured with CONFIG_SCHED_INFO=y.
Looking into .config we can notice the followings;
# Scheduler Debugging
#
# CONFIG_SCHED_DEBUG is not set
CONFIG_SCHED_INFO=y
# CONFIG_SCHEDSTATS is not set
# end of Scheduler Debugging
With below patch, CONFIG_SCHED_INFO can be disabled
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index ee00c6c..dd70401 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1007,7 +1007,6 @@ config SCHED_INFO
config SCHEDSTATS
bool "Collect scheduler statistics"
depends on DEBUG_KERNEL && PROC_FS
- select SCHED_INFO
help
If you say Y here, additional code will be inserted into the
scheduler and related routines to collect statistics about
diff --git a/init/Kconfig b/init/Kconfig
index fc4c9f4..4f4fe52 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -569,7 +569,6 @@ config TASKSTATS
config TASK_DELAY_ACCT
bool "Enable per-task delay accounting"
depends on TASKSTATS
- select SCHED_INFO
help
Collect information on time spent by a task waiting for system
resources like cpu, synchronous block I/O completion and swapping
As above patch indicates, CONFIG_SCHED_DEBUG depends on CONGIF_SCHEDSTATS.