[gentoo-portage-dev] [PATCH 2/2] Replace multiprocessing.cpu_count with portage.util.cpuinfo.get_cpu_count

2019-02-15 Thread robbat2
From: "Robin H. Johnson" portage.util.cpuinfo.get_cpu_count was only used in one spot before, and other call-sites just used multiprocessing.cpu_count() directly. Replace all multiprocessing.cpu_count() calls with get_cpu_count() in portage.util.cpuinfo, to ensure consistency in CPU

[gentoo-portage-dev] [PATCH 1/2] cpuinfo: use better available CPU calculation

2019-02-15 Thread robbat2
From: "Robin H. Johnson" The existing portage.util.cpuinfo.get_cpu_count() behavior is wrong when run in any environment where the cpuset is a subset of online CPUs. The solution recommended by the 'os.cpu_count()' help is to use: len(os.sched_getaffinity(0)) This only works on line, so keep

Re: [gentoo-portage-dev] [PATCH 2/2] Replace multiprocessing.cpu_count with portage.util.cpuinfo.get_cpu_count

2019-02-15 Thread Zac Medico
On 2/15/19 10:21 PM, robb...@gentoo.org wrote: > From: "Robin H. Johnson" > > portage.util.cpuinfo.get_cpu_count was only used in one spot before, and > other call-sites just used multiprocessing.cpu_count() directly. > > Replace all multiprocessing.cpu_count() calls with get_cpu_count() in >