Commit Graph

2 Commits

Author SHA1 Message Date
Stefan Liebler 09ea1afec7 affinity-inheritance: Overallocate CPU sets
Some kernels on S390 appear to return a CPU affinity mask based on
configured processors rather than the ones online.  Overallocate the CPU
set to match that, but operate only on the ones online.

Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Co-authored-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2025-01-14 09:23:36 -05:00
Siddhesh Poyarekar e41aabcc93 tests: Verify inheritance of cpu affinity
Add a couple of tests to verify that CPU affinity set using
sched_setaffinity and pthread_setaffinity_np are inherited by a child
process and child thread.

Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2025-01-09 10:51:38 -05:00