On 4/11/19 7:29 PM, Daniel Henrique Barboza wrote:
On 4/11/19 11:56 AM, Michal Privoznik wrote:
> 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>
>
Tried with this extra setting, still no good. Domain still boots, even if
there is not enough memory to load up all its ram in the NUMA node
I am setting. For reference, this is the top of the guest XML:
<name>vm1</name>
<uuid>f48e9e35-8406-4784-875f-5185cb4d47d7</uuid>
<memory unit='KiB'>314572800</memory>
<currentMemory unit='KiB'>314572800</currentMemory>
<memoryBacking>
<allocation mode='immediate'/>
</memoryBacking>
<vcpu placement='static'>16</vcpu>
<numatune>
<memory mode='strict' nodeset='0'/>
</numatune>
<os>
<type arch='ppc64' machine='pseries'>hvm</type>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
While doing this test, I recalled that some of my IBM peers recently
mentioned that they were unable to do a pre-allocation of the RAM
of a pseries guest using Libvirt, but they were able to do it using QEMU
directly (using -realtime mlock=on). In fact, I just tried it out with
command
line QEMU and the guest allocated all the memory at boot.
Ah, so looks like -mem-prealloc doesn't work at Power? Can you please check:
1) that -mem-prealloc is on the qemu command line
2) how much memory qemu allocates right after it started the guest? I
mean, before you start some mem stress test which causes it to allocate
the memory fully.
This means that the pseries guest is able to do mem pre-alloc. I'd say that
there might be something missing somewhere (XML, host setup, libvirt
config ...) or perhaps even a bug that is preventing Libvirt from doing
this pre-alloc. This explains why I can't verify this patch series. I'll
see if
I dig it further to understand why when I have the time.
Yeah, I don't know Power well enough to help you. Sorry.
Michal