Bug 725855

Summary: Avoid merging a VMA with another VMA which is cloned from the parent process.
Product: Red Hat Enterprise Linux 6 Reporter: Larry Woodman <lwoodman>
Component: kernelAssignee: Larry Woodman <lwoodman>
Status: CLOSED ERRATA QA Contact: Caspar Zhang <czhang>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2CC: kzhang, martinez, qcai, randerso
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kernel-2.6.32-189.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 845420 (view as bug list) Environment:
Last Closed: 2011-12-06 13:54:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 741979    
Bug Blocks: 688933    
Attachments:
Description Flags
reproducer (proof of concept) none

Description Larry Woodman 2011-07-26 18:29:19 UTC
Description of problem:

RHEL6 is missing this upstream performance optimization that avoids merging some VMAs which are cloned from the parent process:

commit 965f55dea0e331152fa53941a51e4e16f9f06fae
Author: Shaohua Li <shaohua.li>
Date:   Tue May 24 17:11:20 2011 -0700

    mmap: avoid merging cloned VMAs

    Avoid merging a VMA with another VMA which is cloned from the parent process.

    The cloned VMA shares the anon_vma lock with the parent process's VMA.  If
    we do the merge, more vmas (even the new range is only for current
    process) use the perent process's anon_vma lock.  This introduces
    scalability issues.  find_mergeable_anon_vma() already considers this
    case.

    Signed-off-by: Shaohua Li <shaohua.li>
    Cc: Rik van Riel <riel>
    Cc: Hugh Dickins <hughd>
    Cc: Andi Kleen <andi>
    Signed-off-by: Andrew Morton <akpm>
    Signed-off-by: Linus Torvalds <torvalds>



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 5 Qian Cai 2011-07-29 07:30:54 UTC
Created attachment 515832 [details]
reproducer (proof of concept)

On an unpatched kernel, at the end of output there is a single 6*pagesize VMA area for the child like this,

7fee32989000-7fee3298f000 -w-p 00000000 00:00 0

On a patched kernel, there are two 3*pagesize VMA areas like this,

7f55bbd47000-7f55bbd4a000 -w-p 00000000 00:00 0 
7f55bbd4a000-7f55bbd4d000 -w-p 00000000 00:00 0

Comment 6 Qian Cai 2011-07-29 13:00:17 UTC
Tips for testing: also to make sure that micro-benchmark like perf to measure the performance improve for multiple page faults workloads like this. Here to get some inspiration - http://lwn.net/Articles/368105/

Comment 7 Aristeu Rozanski 2011-08-15 21:20:33 UTC
Patch(es) available on kernel-2.6.32-189.el6

Comment 10 Marizol Martinez 2011-09-30 19:56:34 UTC
*** Bug 713953 has been marked as a duplicate of this bug. ***

Comment 12 errata-xmlrpc 2011-12-06 13:54:46 UTC
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