On 4/11/19 4:23 PM, Daniel Henrique Barboza wrote:
Hi,
I've tested these patches again, twice, in similar setups like I tested
the first version (first in a Power8, then in a Power9 server).
Same results, though. Libvirt will not avoid the launch of a pseries guest,
with numanode=strict, even if the numa node does not have available
RAM. If I stress test the memory of the guest to force the allocation,
QEMU exits with an error as soon as the memory of the host numa node
is exhausted.
Yes, this is expected. I mean, by default qemu doesn't allocate memory
for the guest fully. You'd have to force it:
<memoryBacking>
<allocation mode='immediate'/>
</memoryBacking>
If I change the numanode setting to 'preferred' and repeats the test, QEMU
doesn't exit with an error - the process starts to take memory from other
numa nodes. This indicates that the numanode policy is apparently being
forced in the QEMU process - however, it is not forced in VM boot.
I've debugged it a little and haven't found anything wrong that jumps the
eye. All functions that succeeds qemuSetupCpusetMems exits out with
ret = 0. Unfortunately, I don't have access to a x86 server with more than
one NUMA node to compare results.
Since I can't say for sure if what I'm seeing is an exclusive pseries
behavior, I see no problem into pushing this series upstream
if it makes sense for x86. We can debug/fix the Power side later.
I bet that if you force the allocation then the domain will be unable to
boot.
Thanks for the testing!
Michal