Files
android_kernel_samsung_sm8750/include/linux
Michel Lespinasse 38a76013ad mm: avoid taking rmap locks in move_ptes()
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 placed after the original in rmap traversal
order, we can avoid taking the rmap locks in move_ptes().

Essentially, this reintroduces the optimization that had been disabled in
"mm anon rmap: remove anon_vma_moveto_tail".  The difference is that we
don't try to impose the rmap traversal order; instead we just rely on
things being in the desired order in the common case and fall back to
taking locks in the uncommon case.  Also we skip the i_mmap_mutex in
addition to the anon_vma lock: in both cases, the vmas are traversed in
increasing vm_pgoff order with ties resolved in tree insertion order.

Signed-off-by: Michel Lespinasse <walken@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Daniel Santos <daniel.santos@pobox.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-09 16:22:42 +09:00
..
2012-09-19 19:08:53 -06:00
2012-09-27 14:28:09 -03:00
2012-08-10 15:27:02 -04:00
2012-07-30 17:25:21 -07:00
2012-10-06 03:04:35 +09:00
2012-09-19 19:08:46 -06:00
2012-08-07 10:10:57 +02:00
2012-07-30 17:25:11 -07:00
2012-09-17 15:00:38 -07:00
2012-09-17 15:00:38 -07:00
2012-08-21 01:19:54 -07:00
2012-09-05 12:18:11 -07:00
2012-09-27 09:29:33 -04:00
2012-09-26 21:10:00 -04:00
2012-10-09 16:22:15 +09:00
2012-08-09 16:18:06 -07:00
2012-09-19 19:50:20 +02:00
2012-10-06 03:04:56 +09:00
2012-08-14 14:28:32 -07:00
2012-10-01 18:39:45 -04:00
2012-08-14 14:28:32 -07:00
2012-09-07 14:57:45 -04:00
2012-09-11 10:15:02 +02:00
2012-08-14 14:28:32 -07:00
2012-07-17 09:13:37 -07:00
2012-09-26 13:52:36 -07:00
2012-08-22 10:24:41 -04:00
2012-09-17 15:00:37 -07:00
2012-07-29 21:24:13 +04:00
2012-10-06 03:05:24 +09:00
2012-09-27 10:47:59 +02:00
2012-07-30 19:06:52 -04:00
2012-07-30 19:06:52 -04:00
2012-10-09 16:22:24 +09:00
2012-07-31 18:42:43 -07:00
2012-10-05 22:23:53 +02:00
2012-09-13 09:08:02 -06:00
2012-07-19 10:38:32 -04:00
2012-08-21 20:50:25 +02:00
2012-10-09 16:22:42 +09:00
2012-10-06 03:05:01 +09:00
2012-10-09 16:22:24 +09:00
2012-09-06 09:17:01 -07:00
2012-07-30 17:25:20 -07:00
2012-07-16 22:31:34 -07:00
2012-08-21 16:28:31 +02:00
2012-10-09 16:22:32 +09:00
2012-07-22 23:57:55 +04:00
2012-09-05 17:21:36 -07:00
2012-07-31 08:16:24 -06:00
2012-09-28 15:05:15 +09:30
2012-07-31 18:42:50 -07:00
2012-08-04 12:15:37 +04:00