core: Add memtune hard_limit for q35 VMs with many CPUs #382
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When a VM with q35 chipset has at least 256 maximum vCPUs and contains
VFIO devices, it can fail to start. It can happen for two reasons:
There are multiple VFIO devices in the same IOMMU group and their
drivers don’t handle it properly.
The memory locking limit needed to handle the VFIO devices is
exceeded.
oVirt cannot do anything about 1., such a situation must be fixed in
the low level layers. As for 2., it should be fixed in QEMU one day
but we can work around it now by specifying a sufficiently high limit
on the amount of QEMU and guest memory locked in the host
memory (i.e. not being able to swap out). The limit should be at
least VM maximum RAM times the number of VFIO devices. We set it
simply to an extremely high value regardless the presence and number
of VFIO devices, which should cause no trouble because we don’t want
to swap out VM memory anyway.
See https://bugzilla.redhat.com/show_bug.cgi?id=2048429#c9 for more
details.
Bug-Url: https://bugzilla.redhat.com/2081241
Bug-Url: https://bugzilla.redhat.com/2048429