The affinity package currently used to achieve CPU pinning under KVM is a thin wrapper around the two sched_(g/s)etaffinity system calls. Unfortunately, the package does not use the CPU_SET macro, but does a cast of a C long long - which works until 64 CPUs are present, and casting issues prevent the 64th CPU from being assigned, not to mention any more CPUs that could be present in a node.
As we have had user reports of this becoming a problem, this patch series replaces the affinity library by the more potent and better-maintained psutil library, which handles the system calls correctly. Hrvoje Ribicic (5): Refactor process affinity setting into function Replace the affinity library with psutil Document the package change in installation procedures Modify the pinning design doc Update the NEWS file INSTALL | 8 +++---- NEWS | 3 +++ configure.ac | 2 +- devel/build_chroot | 2 +- doc/design-cpu-pinning.rst | 11 +++++---- lib/hypervisor/hv_kvm/__init__.py | 50 ++++++++++++++++----------------------- src/Ganeti/Constants.hs | 8 ------- 7 files changed, 36 insertions(+), 48 deletions(-) -- 2.0.0.526.g5318336
