Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

sched: Add commadline option for RT_GROUP_SCHED toggling

Only simple implementation with a static key wrapper, it will be wired
in later.

Signed-off-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20250310170442.504716-5-mkoutny@suse.com

authored by

Michal Koutný and committed by
Peter Zijlstra
e34e0131 a5a25b32

+58
+5
Documentation/admin-guide/kernel-parameters.txt
··· 6280 6280 Memory area to be used by remote processor image, 6281 6281 managed by CMA. 6282 6282 6283 + rt_group_sched= [KNL] Enable or disable SCHED_RR/FIFO group scheduling 6284 + when CONFIG_RT_GROUP_SCHED=y. Defaults to 6285 + !CONFIG_RT_GROUP_SCHED_DEFAULT_DISABLED. 6286 + Format: <bool> 6287 + 6283 6288 rw [KNL] Mount root device read-write on boot 6284 6289 6285 6290 S [KNL] Run init in single mode
+11
init/Kconfig
··· 1082 1082 realtime bandwidth for them. 1083 1083 See Documentation/scheduler/sched-rt-group.rst for more information. 1084 1084 1085 + config RT_GROUP_SCHED_DEFAULT_DISABLED 1086 + bool "Require boot parameter to enable group scheduling for SCHED_RR/FIFO" 1087 + depends on RT_GROUP_SCHED 1088 + default n 1089 + help 1090 + When set, the RT group scheduling is disabled by default. The option 1091 + is in inverted form so that mere RT_GROUP_SCHED enables the group 1092 + scheduling. 1093 + 1094 + Say N if unsure. 1095 + 1085 1096 config EXT_GROUP_SCHED 1086 1097 bool 1087 1098 depends on SCHED_CLASS_EXT && CGROUP_SCHED
+25
kernel/sched/core.c
··· 9892 9892 { } /* Terminate */ 9893 9893 }; 9894 9894 9895 + #ifdef CONFIG_RT_GROUP_SCHED 9896 + # ifdef CONFIG_RT_GROUP_SCHED_DEFAULT_DISABLED 9897 + DEFINE_STATIC_KEY_FALSE(rt_group_sched); 9898 + # else 9899 + DEFINE_STATIC_KEY_TRUE(rt_group_sched); 9900 + # endif 9901 + 9902 + static int __init setup_rt_group_sched(char *str) 9903 + { 9904 + long val; 9905 + 9906 + if (kstrtol(str, 0, &val) || val < 0 || val > 1) { 9907 + pr_warn("Unable to set rt_group_sched\n"); 9908 + return 1; 9909 + } 9910 + if (val) 9911 + static_branch_enable(&rt_group_sched); 9912 + else 9913 + static_branch_disable(&rt_group_sched); 9914 + 9915 + return 1; 9916 + } 9917 + __setup("rt_group_sched=", setup_rt_group_sched); 9918 + #endif /* CONFIG_RT_GROUP_SCHED */ 9919 + 9895 9920 static int cpu_extra_stat_show(struct seq_file *sf, 9896 9921 struct cgroup_subsys_state *css) 9897 9922 {
+17
kernel/sched/sched.h
··· 1500 1500 } 1501 1501 1502 1502 #endif /* !CONFIG_SCHED_CORE */ 1503 + #ifdef CONFIG_RT_GROUP_SCHED 1504 + # ifdef CONFIG_RT_GROUP_SCHED_DEFAULT_DISABLED 1505 + DECLARE_STATIC_KEY_FALSE(rt_group_sched); 1506 + static inline bool rt_group_sched_enabled(void) 1507 + { 1508 + return static_branch_unlikely(&rt_group_sched); 1509 + } 1510 + # else 1511 + DECLARE_STATIC_KEY_TRUE(rt_group_sched); 1512 + static inline bool rt_group_sched_enabled(void) 1513 + { 1514 + return static_branch_likely(&rt_group_sched); 1515 + } 1516 + # endif /* CONFIG_RT_GROUP_SCHED_DEFAULT_DISABLED */ 1517 + #else 1518 + # define rt_group_sched_enabled() false 1519 + #endif /* CONFIG_RT_GROUP_SCHED */ 1503 1520 1504 1521 static inline void lockdep_assert_rq_held(struct rq *rq) 1505 1522 {