Hide Forgot
Description of problem: transparent hugepages weren't natively supported by several places in the kernel, this adds transparent hugepage native support to several places (mremap, mincore, mprotect, /proc/<pid>/smaps, /proc/vmstat) and adds some compaction improvement Version-Release number of selected component (if applicable): RHEL6.2 How reproducible: Steps to Reproduce: 1. grep Anon /proc/self/smaps and verify AnonHugePages is present 2. grep thp /proc/vmstat and verify several thp stats are visible 3. run mprotect, mincore, mremap on a THP mapping and verify thp_split doesn't increase in /proc/vmstat Actual results: AnonHugePages missing in /proc/self/smaps, /proc/vmstat thp_* stats missing, mprotect/mincore/mremap splitting hugepages even if 2M alignments aren't altered. Expected results: AnonHugePages present in /proc/self/smaps, thp_* stats present in /proc/vmstat, mprotect/mincore/mremap not splitting hugepages if 2M alignments aren't broken Additional info: The mremap patch significantly optimize the kernel even when THP are not used because being used on file mappings, or when THP is disabled, by reducing the SMP IPIs to 1 per vma, instead of 1 per 4k page. The mremap patch is also the most risky of the series, but it's also one that can provide the biggest boost to JVM or other applications using mremap (especially on THP but also without). Shak tested a kernel with these patches and the result was: [root@perf34 SPECjbb2005]# grep throughput r6_*perf34*.txt Static huge pages: r6_131_perf34_80cpu_huge.txt: throughput = 721564.06 SPECjbb2005 bops THP - 2.6.32-131 - RHEL6.1 snap5 r6_131_perf34_80cpu_thtp.txt: throughput = 749127.42 SPECjbb2005 bops THP - Andrea's 2.6.32-140thp r6_140thp_perf34_80cpu_thtp.txt: throughput = 761363.25 SPECjbb2005 bops
Build with these patches based on -151: https://brewweb.devel.redhat.com/taskinfo?taskID=3339439 19 patches posted to rhkernel-list on the thread with Message-Id: <20110520110640.655593797>.
*** Bug 679997 has been marked as a duplicate of this bug. ***
Patch number 2/19 has been obsoleted for an (harmless) double accounting in /proc/vmstat and new replacement patch 2/19 is submitted to rhkernel-list with Message-ID: <20110526172833.GP19505>
A replacement patch for 15/19 has been posted to rhkernel-list with Message-ID: <20110526220056.GR19505>. Patch 15/19 was developed before 29 Mar, but after that date the RHEL6 kernel uses walk_page_range in memcontrol.c too so it now requires two liner additions to the the memcontrol.c file compared to the previous version originally backported to an older codebase. Thanks to Johannes for noticing.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
Posted an incremental patch to fix bug in patch 11/19: Message-ID: <20110706152029.GD2820>
Patch(es) available on kernel-2.6.32-177.el6
Patch(es) available on kernel-2.6.32-156.el6
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: In RHEL6.2, Transparent Hugepages adds natively supported in several places of the kernel such as to the syscalls of mremap, mincore, mprotect; /proc tunable paremeters: /proc/<pid>/smaps, /proc/vmstat, and adds some compaction improvement
Created attachment 531100 [details] mincore.c simple test program to check mincore thp support
Created attachment 531101 [details] mprotect.c
Created attachment 531102 [details] mremap.c
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,2 +1,6 @@ -In RHEL6.2, Transparent Hugepages adds natively supported in +In Red Hat Enterprise Linux 6.2, Transparent Huge Pages are now supported in several places of the kernel: -several places of the kernel such as to the syscalls of mremap, mincore, mprotect; /proc tunable paremeters: /proc/<pid>/smaps, /proc/vmstat, and adds some compaction improvement+ + The system calls of mremap, mincore, and mprotect + /proc tunable parameters: /proc/<pid>/smaps and /proc/vmstat + +Additionally, Transparent Huge Pages add some compaction improvements.
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. http://rhn.redhat.com/errata/RHSA-2011-1530.html