[PATCH 7/7] mm: avoid taking rmap locks in move_ptes()

2012-09-04 Thread Michel Lespinasse
During mremap(), the destination VMA is generally placed after the original vma in rmap traversal order: in move_vma(), we always have new_pgoff >= vma->vm_pgoff, and as a result new_vma->vm_pgoff >= vma->vm_pgoff unless vma_merge() merged the new vma with an adjacent one. When the destination

[PATCH 7/7] mm: avoid taking rmap locks in move_ptes()

2012-09-04 Thread Michel Lespinasse
During mremap(), the destination VMA is generally placed after the original vma in rmap traversal order: in move_vma(), we always have new_pgoff = vma-vm_pgoff, and as a result new_vma-vm_pgoff = vma-vm_pgoff unless vma_merge() merged the new vma with an adjacent one. When the destination VMA is