Skip to content

Commit d3df587

Browse files
afazekaspevik
authored andcommitted
sched_football: use get_numcpus()
sched_football can hang in systems where not all CPU cores are available, using get_numcpus() to account for things like isolated cores. Link: https://lore.kernel.org/ltp/20250117135745.909549-3-afazekas@redhat.com/ Reviewed-by: Cyril Hrubis <chrubis@suse.cz> Reviewed-by: Petr Vorel <pvorel@suse.cz> Signed-off-by: Attila Fazekas <afazekas@redhat.com>
1 parent 7ea91a7 commit d3df587

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

testcases/realtime/func/sched_football/sched_football.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ static void do_test(void)
140140
int i;
141141

142142
if (players_per_team == 0)
143-
players_per_team = sysconf(_SC_NPROCESSORS_ONLN);
143+
players_per_team = get_numcpus();
144144

145145
tst_atomic_store(0, &players_ready);
146146

0 commit comments

Comments
 (0)