[PATCH V1 1/4] sched: Add kconfig of predict load.

zihan zhou posted 4 patches 9 months, 4 weeks ago
[PATCH V1 1/4] sched: Add kconfig of predict load.
Posted by zihan zhou 9 months, 4 weeks ago
Using predict load will make the scheduler logic more complex and take
up more resources. When we are not sure whether to use it, we should be
able to close it.

Signed-off-by: zihan zhou <15645113830zzh@gmail.com>
---
 init/Kconfig      | 10 ++++++++++
 lib/Kconfig.debug | 12 ++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/init/Kconfig b/init/Kconfig
index d0d021b3fa3b..83cff5d63ce2 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -573,6 +573,16 @@ config HAVE_SCHED_AVG_IRQ
 	depends on IRQ_TIME_ACCOUNTING || PARAVIRT_TIME_ACCOUNTING
 	depends on SMP
 
+config SCHED_PREDICT_LOAD
+	bool "Predict the load of se"
+	depends on SMP
+	help
+	  Select this option to enable the load prediction, the load at the
+	  time of dequeue will be predicted according the load at the time
+	  of enqueue.
+
+	  Say N if unsure.
+
 config SCHED_HW_PRESSURE
 	bool
 	default y if ARM && ARM_CPU_TOPOLOGY
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 1af972a92d06..01b23677d003 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1310,6 +1310,18 @@ config SCHED_DEBUG
 	  that can help debug the scheduler. The runtime overhead of this
 	  option is minimal.
 
+config SCHED_PREDICT_LOAD_DEBUG
+	bool "Debug for SCHED_PREDICT_LOAD"
+	depends on SMP && SCHED_PREDICT_LOAD && SCHED_DEBUG
+	default y
+	help
+	  If you say Y here, the /proc/$pid/predict_load file will be provided
+	  the information of task se that can help debug the SCHED_PREDICT_LOAD.
+	  The /sys/kernel/debug/sched/debug file can also see the information
+	  of group se, but compared with task se, there is less information.
+
+	  Say N if unsure.
+
 config SCHED_INFO
 	bool
 	default n
-- 
2.33.0