Skip to content

Commit ca84068

Browse files
Shrikanth Hegdealoktiwa
authored andcommitted
sched/deadline: Use online cpus for validating runtime
[ Upstream commit 14672f0 ] The ftrace selftest reported a failure because writing -1 to sched_rt_runtime_us returns -EBUSY. This happens when the possible CPUs are different from active CPUs. Active CPUs are part of one root domain, while remaining CPUs are part of def_root_domain. Since active cpumask is being used, this results in cpus=0 when a non active CPUs is used in the loop. Fix it by looping over the online CPUs instead for validating the bandwidth calculations. Signed-off-by: Shrikanth Hegde <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Reviewed-by: Juri Lelli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sasha Levin <[email protected]> (cherry picked from commit 0ab44f03c50fceb8c8bd27ea9b61039c5c611cf0) Signed-off-by: Alok Tiwari <[email protected]>
1 parent a73b4bf commit ca84068

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/sched/deadline.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2521,7 +2521,7 @@ int sched_dl_global_validate(void)
25212521
* cycling on root_domains... Discussion on different/better
25222522
* solutions is welcome!
25232523
*/
2524-
for_each_possible_cpu(cpu) {
2524+
for_each_online_cpu(cpu) {
25252525
rcu_read_lock_sched();
25262526
dl_b = dl_bw_of(cpu);
25272527
cpus = dl_bw_cpus(cpu);

0 commit comments

Comments
 (0)