Bug 1495535 - Add validation to disallow hotplug memory if vm uses huge pages
Summary: Add validation to disallow hotplug memory if vm uses huge pages
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.2.0
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ovirt-4.2.1
: ---
Assignee: Tomas Jelinek
QA Contact: Artyom
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-26 09:19 UTC by Artyom
Modified: 2018-02-12 11:55 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-02-12 11:55:32 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)
engine and vdsm log (1.40 MB, application/zip)
2017-09-26 09:19 UTC, Artyom
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 84989 0 master MERGED core: disallow hotplug memory for huge page backed VMs 2017-12-14 12:02:25 UTC

Description Artyom 2017-09-26 09:19:00 UTC
Created attachment 1330947 [details]
engine and vdsm log

Description of problem:
Hotplug memory does not work for VM that configured to use 1 GB hugepages

Version-Release number of selected component (if applicable):
ovirt-engine-4.2.0-0.0.master.20170921184504.gitfcfc9a7.el7.centos.noarch
vdsm-4.20.3-88.git6102334.el7.centos.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Configure host to have 2 1 GB hugepages
# 2 > /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages
2. Configure VM to have 1 GB memory and custom property hugepages with 1048576
3. Start VM
4. Verify hugepages consumption
cat /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages
2
cat /sys/kernel/mm/hugepages/hugepages-1048576kB/free_hugepages
1
5. Hotplug additional 1 GB of memory


Actual results:
VM still has 1 GB of memory and
cat /sys/kernel/mm/hugepages/hugepages-1048576kB/free_hugepages
1


Expected results:
VM has 2 GB of memory and 
cat /sys/kernel/mm/hugepages/hugepages-1048576kB/free_hugepages
0

Additional info:
Under the engine log I can see
2017-09-26 12:14:52,322+03 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-40) [1ff4d77f] EVENT_ID: FAILED_HOT_SET_MEMORY(2,040), Failed to hot set memory to VM golden_env_mixed_virtio_0. Underlying error message: internal error: unable to execute QEMU command 'object-add': memory size 0x38000000 must be equal to or larger than page size 0x40000000

Comment 1 Tomas Jelinek 2017-09-26 14:02:35 UTC
changing title to explicitely validate it - hotplug indeed does not work for hugepages VMs

Comment 2 Artyom 2017-09-26 14:38:28 UTC
I tried hot-plug and also hot-unplug for VM's with 2 MB hugepages and it worked fine.
So the question what the expected behavior.

Comment 3 Michal Skrivanek 2017-09-26 16:35:15 UTC
(In reply to Tomas Jelinek from comment #1)
> changing title to explicitely validate it - hotplug indeed does not work for
> hugepages VMs

or rather fix it? it would need special behavior due to the "special" 256MB module...but other than that it should all work

Comment 4 Tomas Jelinek 2017-10-03 09:14:38 UTC
(In reply to Michal Skrivanek from comment #3)
> (In reply to Tomas Jelinek from comment #1)
> > changing title to explicitely validate it - hotplug indeed does not work for
> > hugepages VMs
> 
> or rather fix it? it would need special behavior due to the "special" 256MB
> module...but other than that it should all work

In theory yes, but it would require quite some testing to make sure it is really working. And considering this is mostly about high perf vms, it is safer to disallow it than to make it work.

High perf VMs have anyway lots of limitations we need to handle for 4.3, this can be one of them...

Comment 5 Artyom 2018-01-25 08:29:04 UTC
Verified on rhvm-4.2.1.1-0.1.el7.noarch 
golden_env_mixed_virtio_0:
Cannot edit VM. Memory hot set is not supported for virtual machines with huge pages.

Comment 6 Sandro Bonazzola 2018-02-12 11:55:32 UTC
This bugzilla is included in oVirt 4.2.1 release, published on Feb 12th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.1 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.