RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 864123 - QEMU will only use THP if it's enabled system wide
Summary: QEMU will only use THP if it's enabled system wide
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Luiz Capitulino
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-08 16:21 UTC by Luiz Capitulino
Modified: 2014-06-18 08:51 UTC (History)
7 users (show)

Fixed In Version: qemu 1.3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 09:31:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Luiz Capitulino 2012-10-08 16:21:10 UTC
Description of problem:

QEMU will only use transparent huge pages if it's enabled system wide. This happens because QEMU doesn't call MADV_HUGEPAGE for ram allocations.


Version-Release number of selected component (if applicable): QEMU 1.2 and earlier


How reproducible:


Steps to Reproduce:
1. Enable THP only for MADV_HUGEPAGE:

  # echo madvise > /sys/kernel/mm/transparent_hugepage/enabled

2. Start a QEMU process (a reasonable amount of RAM, say 1G, should be better)

3. Check QEMU's huge page usage

  # grep AnonHugePages /proc/qemu-pid/smaps
  
Actual results:

All lines is:

AnonHugePages:         0 kB

Meaning that huge pages are not used.

Expected results:

Some lines should have > 0 results, eg:

AnonHugePages:    276480 kB

Additional info:

Comment 1 Luiz Capitulino 2012-10-08 16:22:48 UTC
Posted patch upstream:

https://lists.gnu.org/archive/html/qemu-devel/2012-10/msg01012.html

Comment 2 Luiz Capitulino 2012-10-23 15:41:38 UTC
Patch merged on qemu upstream, commit: ad0b5321f1f797274603ebbe20108b0750baee94

Comment 4 Shaolong Hu 2014-01-17 05:46:40 UTC
Verified on qemu-kvm-rhev-1.5.3-31.el7.x86_64:


[root@localhost ~]# grep AnonHugePages /proc/21914/smaps
AnonHugePages:         0 kB
AnonHugePages:         0 kB
AnonHugePages:    530432 kB
AnonHugePages:         0 kB
...

Comment 5 Ludek Smid 2014-06-13 09:31:38 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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