]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm-move-all-mmu-notifier-invocations-to-be-done-outside-the-pt-lock-fix
authorAndrew Morton <akpm@linux-foundation.org>
Fri, 7 Sep 2012 00:24:24 +0000 (10:24 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 10 Sep 2012 06:18:11 +0000 (16:18 +1000)
possible speed tweak in hugetlb_cow(), cleanups

Cc: Andrea Arcangeli <andrea@qumranet.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Haggai Eran <haggaie@mellanox.com>
Cc: Liran Liss <liranl@mellanox.com>
Cc: Or Gerlitz <ogerlitz@mellanox.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Sagi Grimberg <sagig@mellanox.com>
Cc: Shachar Raindel <raindel@mellanox.com>
Cc: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/hugetlb.c
mm/memory.c

index d7f7b38f277e0b8e7a9cdef2f6e461aaf6750dcc..c1c695c8835102c4318109f0ee5a55388c6898aa 100644 (file)
@@ -2616,7 +2616,7 @@ retry_avoidcopy:
        __SetPageUptodate(new_page);
 
        mmun_start = address & huge_page_mask(h);
-       mmun_end   = (address & huge_page_mask(h)) + huge_page_size(h);
+       mmun_end = mmun_start + huge_page_size(h);
        mmu_notifier_invalidate_range_start(mm, mmun_start, mmun_end);
        /*
         * Retake the page_table_lock to check for racing updates
index c893a6e42a6445362744310427e1eae5a22e4a75..ef003fecea9d002848a32a11c26f4188ad3fbd4f 100644 (file)
@@ -1096,8 +1096,7 @@ int copy_page_range(struct mm_struct *dst_mm, struct mm_struct *src_mm,
        } while (dst_pgd++, src_pgd++, addr = next, addr != end);
 
        if (is_cow_mapping(vma->vm_flags))
-               mmu_notifier_invalidate_range_end(src_mm, mmun_start,
-                                                 mmun_end);
+               mmu_notifier_invalidate_range_end(src_mm, mmun_start, mmun_end);
        return ret;
 }