Skip to content

Commit 14672f0

Browse files
Shrikanth HegdeIngo Molnar
authored andcommitted
sched/deadline: Use online cpus for validating runtime
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]
1 parent 3b4035d commit 14672f0

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
@@ -3189,7 +3189,7 @@ int sched_dl_global_validate(void)
31893189
* value smaller than the currently allocated bandwidth in
31903190
* any of the root_domains.
31913191
*/
3192-
for_each_possible_cpu(cpu) {
3192+
for_each_online_cpu(cpu) {
31933193
rcu_read_lock_sched();
31943194

31953195
if (dl_bw_visited(cpu, gen))

0 commit comments

Comments
 (0)