This is actually work in progress, as it's just the base function which should be used libxc's setup_guest(). It mimics the current XendDomainInfo.py:find_relaxed_node() code, which can eventually go away. The function iterates over all VCPUs in all domains to determine each node's load. It considers VCPUs pinned to single nodes vs. unpinned VCPUs which result in a lower load for each node (although the sum is equal). Also added is the amount of free memory, this can be used to sequentially determine the best host node for each guest node. Signed-off-by: Andre Przywara Regards, Andre. -- Andre Przywara AMD-Operating System Research Center (OSRC), Dresden, Germany Tel: +49 351 488-3567-12 ----to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Andrew Bowd; Thomas M. McCoy; Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632