Skip to content

Commit 221394c

Browse files
Shrikanth Hegdevijay-suman
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 26d4d84aa6cfb8a77c73677024c77e6f5a8a6962) Signed-off-by: Vijayendra Suman <[email protected]>
1 parent 2aca774 commit 221394c

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
@@ -2611,7 +2611,7 @@ int sched_dl_global_validate(void)
26112611
* value smaller than the currently allocated bandwidth in
26122612
* any of the root_domains.
26132613
*/
2614-
for_each_possible_cpu(cpu) {
2614+
for_each_online_cpu(cpu) {
26152615
rcu_read_lock_sched();
26162616

26172617
if (dl_bw_visited(cpu, gen))

0 commit comments

Comments
 (0)