AgentD / squashfs-tools-ng

A new set of tools and libraries for working with SquashFS images
Other
194 stars 30 forks source link

Only use available CPUs #109

Closed wsldankers closed 1 year ago

wsldankers commented 1 year ago

Not all CPUs may be available for the current process. Some CPUs may be offline, others may not be included in the process affinity mask. In such cases too many threads will be created, which will then compete unnecessarily for CPU time.

Use sched_getaffinity() to determine the correct number of threads to create.