lkml.org 
[lkml]   [2016]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCHv2 19/28] thp: run vma_adjust_trans_huge() outside i_mmap_rwsem
    Date
    vma_addjust_trans_huge() splits pmd if it's crossing VMA boundary.
    During split we munlock the huge page which requires rmap walk.
    rmap wants to take the lock on its own.

    Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
    ---
    mm/mmap.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/mm/mmap.c b/mm/mmap.c
    index 2f2415a7a688..c9d0c412b6dd 100644
    --- a/mm/mmap.c
    +++ b/mm/mmap.c
    @@ -802,6 +802,8 @@ again: remove_next = 1 + (end > next->vm_end);
    }
    }

    + vma_adjust_trans_huge(vma, start, end, adjust_next);
    +
    if (file) {
    mapping = file->f_mapping;
    root = &mapping->i_mmap;
    @@ -822,8 +824,6 @@ again: remove_next = 1 + (end > next->vm_end);
    }
    }

    - vma_adjust_trans_huge(vma, start, end, adjust_next);
    -
    anon_vma = vma->anon_vma;
    if (!anon_vma && adjust_next)
    anon_vma = next->anon_vma;
    --
    2.7.0
    \
     
     \ /
      Last update: 2016-02-11 15:41    [W:2.861 / U:0.324 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site