Bug 725855 - Avoid merging a VMA with another VMA which is cloned from the parent process.
Summary: Avoid merging a VMA with another VMA which is cloned from the parent process.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Larry Woodman
QA Contact: Caspar Zhang
URL:
Whiteboard:
: 713953 (view as bug list)
Depends On: 741979
Blocks: 688933
TreeView+ depends on / blocked
 
Reported: 2011-07-26 18:29 UTC by Larry Woodman
Modified: 2011-12-06 13:54 UTC (History)
4 users (show)

Fixed In Version: kernel-2.6.32-189.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 845420 (view as bug list)
Environment:
Last Closed: 2011-12-06 13:54:46 UTC
Target Upstream Version:


Attachments (Terms of Use)
reproducer (proof of concept) (1013 bytes, text/plain)
2011-07-29 07:30 UTC, Qian Cai
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1530 0 normal SHIPPED_LIVE Moderate: Red Hat Enterprise Linux 6 kernel security, bug fix and enhancement update 2011-12-06 01:45:35 UTC

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


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