Skip to content

Commit

Permalink
sched_football: use get_numcpus()
Browse files Browse the repository at this point in the history
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/[email protected]/
Reviewed-by: Cyril Hrubis <[email protected]>
Reviewed-by: Petr Vorel <[email protected]>
Signed-off-by: Attila Fazekas <[email protected]>
  • Loading branch information
afazekas authored and pevik committed Jan 21, 2025
1 parent 7ea91a7 commit d3df587
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion testcases/realtime/func/sched_football/sched_football.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ static void do_test(void)
int i;

if (players_per_team == 0)
players_per_team = sysconf(_SC_NPROCESSORS_ONLN);
players_per_team = get_numcpus();

tst_atomic_store(0, &players_ready);

Expand Down

0 comments on commit d3df587

Please sign in to comment.