Skip to content
Commit e2e8ccbe authored by Ross Burton's avatar Ross Burton Committed by Richard Purdie
Browse files

utils: respect scheduler affinity in cpu_count()



cpu_count() returns multiprocessing.cpu_count() but that is simply returns
os.cpu_count() so we could use that directly.

However this returns the number of CPUs on the host, not the number of
usable CPUs on the host. If the user is using scheduler affinity then
the number of usable CPUs may be less, so when determining how many cores
we can use check the affinity instead.

Signed-off-by: default avatarRoss Burton <ross.burton@arm.com>
Signed-off-by: default avatarRichard Purdie <richard.purdie@linuxfoundation.org>
parent 6ba3e164
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment