Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1624911 - [downstream clone - 4.2.6] [RFE] PAPR Hash Page Table (HPT) resizing (RHV)
[downstream clone - 4.2.6] [RFE] PAPR Hash Page Table (HPT) resizing (RHV)
Status: CLOSED ERRATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
4.0.0
ppc64le Linux
medium Severity medium
: ovirt-4.2.6
: 4.2.6
Assigned To: Michal Skrivanek
Liran Rotenberg
: FutureFeature, TestOnly, ZStream
Depends On: 1308744
Blocks: 1444027
  Show dependency treegraph
 
Reported: 2018-09-03 11:04 EDT by RHV Bugzilla Automation and Verification Bot
Modified: 2018-09-11 10:38 EDT (History)
23 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 1308744
Environment:
Last Closed: 2018-09-04 09:41:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Virt
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
IBM Linux Technology Center 171314 None None None 2018-09-11 10:38 EDT
Red Hat Knowledge Base (Solution) 2788261 None None None 2018-09-03 11:07 EDT
Red Hat Product Errata RHBA-2018:2623 None None None 2018-09-04 09:42 EDT

  None (edit)
Description RHV Bugzilla Automation and Verification Bot 2018-09-03 11:04:40 EDT
+++ This bug is a downstream clone. The original bug is: +++
+++   bug 1308744 +++
======================================================================

RHEV should determine if the guest supports HPT resizing, then increase the default max size of memory.

+++ This bug was initially created as a clone of Bug #1308743 +++

In case libvirt requires changes to support HPT resizing. If no changes required, set this BZ to TestOnly.

+++ This bug was initially created as a clone of Bug #1305398 +++

Description of problem:

Allow the hash page table (HPT) of PAPR guests to be resized at runtime.

This is important for practical memory hotplug.  Without this the HPT needs to be sized for the guest's maximum possible memory - since RHEV wants to set that to 4T, this can result in a much bigger than necessary HPT which wastes host resources and can cause allocation failures.  With HV KVM the HPT is unswappable, contiguous host memory.

This BZ covers the qemu parts of this including TCG and PR KVM implementation of the necessary hypercalls, feature negotation with the guest and enabling the necessary KVM host pieces.

--- Additional comment from David Gibson on 2016-02-07 19:52:00 EST ---

An RFC has been posted upstream:

https://lists.gnu.org/archive/html/qemu-devel/2016-01/msg05852.html

(Originally by Karen Noel)
Comment 1 RHV Bugzilla Automation and Verification Bot 2018-09-03 11:05:03 EDT
*** Bug 1308746 has been marked as a duplicate of this bug. ***

(Originally by Karen Noel)
Comment 3 RHV Bugzilla Automation and Verification Bot 2018-09-03 11:05:17 EDT
The resize-hpt=required machine option in qemu might be useful for RHEV to determine if the guest supports HPT resizing.  With that option qemu will refuse to boot a guest which does not support it (exiting with an error during boot).

So, RHEV could boot with that option, then if the boot fails adjust the max memory size down and restart with without the option to run the non-HPT-resize aware guest.

Obviously RHEV might then want to cache the value, and/or pre-populate it when it knows the distro / version of the guest.

(Originally by David Gibson)
Comment 6 RHV Bugzilla Automation and Verification Bot 2018-09-03 11:05:55 EDT
Note that the necessary qemu and kvm parts for this are now merged downstream.

That least only libvirt work as a prerequisite (which should be relatively simple) to use this in RHV.

(Originally by David Gibson)
Comment 7 RHV Bugzilla Automation and Verification Bot 2018-09-03 11:06:10 EDT
It should be possible to unblock this.  The qemu and libvirt changes are merged and released downstream, and seem to be working well (after some initial bugs were found and fixed).

There shouldn't be a lot that's needed on the oVirt / RHV side.  Basically qemu and the guest should negotiate HPT resizing automatically, and it will be triggered automatically when memory is hotplugged or unplugged.  libvirt should correctly handle locked memory allocation for it.

The only real impact for RHV is that for guests which do support HPT resizing, it can (again) freely use a large maximum memory size without that causing allocation of excessively sized HPTs any more.

(Originally by David Gibson)
Comment 8 RHV Bugzilla Automation and Verification Bot 2018-09-03 11:06:22 EDT
I guess we do not really need to change anything on RHV side. Since the bug was opened we added a notion of max memory (upper hotplug limit) for all platforms and use a conservative default of 4x the configured memory. That helped "enough" with the original problem, for sane VMs we're not allocating 4TB(2TB on ppc) blindly, and user have a way how to change that when they do not plan to use hotplug at all

With the HPT resizing implemented we will just see more VMs to fit into the host as the default overhead of counting with 4x as much memory is gone. But that's entirely transparent to the end user, it will just "work better" now.

(Originally by michal.skrivanek)
Comment 9 RHV Bugzilla Automation and Verification Bot 2018-09-03 11:06:35 EDT
Michal,

Great, sounds like we're in agreement.

(Originally by David Gibson)
Comment 10 RHV Bugzilla Automation and Verification Bot 2018-09-03 11:06:50 EDT
Verified on PPC environment.
Reference to verification:
https://bugzilla.redhat.com/show_bug.cgi?id=1228543
https://bugzilla.redhat.com/show_bug.cgi?id=515840

(Originally by Liran Rotenberg)
Comment 13 errata-xmlrpc 2018-09-04 09:41:47 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHBA-2018:2623

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