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-10-09 16:22:17 +09:00
2012-10-02 20:25:04 -07:00
2012-10-02 20:25:04 -07:00
2012-10-02 20:25:04 -07:00
2012-09-26 21:10:25 -04:00
2012-10-02 20:25:04 -07:00
2012-10-02 20:25:04 -07:00
2012-10-09 16:22:17 +09:00
2012-07-30 17:25:21 -07:00
2012-10-09 16:22:17 +09:00
2012-10-09 16:22:17 +09:00
2012-10-02 21:35:55 -04:00
2012-09-18 01:01:37 -07:00
2012-09-21 03:13:08 -07:00
2012-10-02 11:11:09 -07:00
2012-07-14 16:38:34 +04:00
2012-10-02 13:38:27 -07:00
2012-10-02 20:25:04 -07:00
2012-10-02 20:25:04 -07:00
2012-10-02 20:25:04 -07:00
2012-07-23 00:01:29 +04:00
2012-10-02 20:25:04 -07:00
2012-10-04 09:14:01 -07:00
2012-10-09 16:22:17 +09:00
2012-10-06 03:05:12 +09:00
2012-10-02 20:25:04 -07:00
2011-07-21 10:59:16 -07:00
2012-10-09 16:22:17 +09:00
2012-10-09 16:22:17 +09:00
2012-10-02 20:25:04 -07:00
2012-10-02 20:25:04 -07:00
2012-09-21 03:13:23 -07:00
2012-10-06 03:05:08 +09:00
2012-07-23 00:01:29 +04:00
2012-10-09 16:22:39 +09:00
2012-10-02 20:25:04 -07:00
2012-09-12 15:52:03 +02:00
2012-10-08 06:36:39 +09:00
2012-10-09 16:22:32 +09:00
2012-10-03 08:48:21 -07:00
2012-09-22 20:48:20 -04:00
2012-10-02 20:25:04 -07:00
2012-10-02 20:25:04 -07:00
2012-10-02 20:25:04 -07:00
2012-10-09 16:22:17 +09:00
2011-03-31 11:26:23 -03:00
2012-10-02 20:25:04 -07:00
2012-10-09 16:22:17 +09:00
2012-06-01 19:51:22 -07:00
2012-09-26 22:20:08 -04:00
2012-10-02 20:25:04 -07:00
2012-10-09 16:22:17 +09:00
2012-10-06 03:05:31 +09:00
2012-10-02 21:35:55 -04:00
2012-10-09 16:22:32 +09:00
2012-09-20 17:04:50 -07:00
2012-10-02 20:25:04 -07:00
2012-10-02 20:25:04 -07:00
2012-10-02 11:11:09 -07:00
2012-07-14 16:34:47 +04:00
2012-10-04 09:14:01 -07:00
2012-10-02 21:35:55 -04:00
2012-10-02 20:25:04 -07:00
2012-09-04 16:11:31 -07:00
2012-10-02 20:25:04 -07:00
2012-10-09 16:22:17 +09:00
2012-10-04 09:14:01 -07:00
2012-10-02 20:25:04 -07:00
2012-10-09 16:22:17 +09:00
2012-07-22 23:57:59 +04:00
2012-03-20 21:29:45 -04:00
2012-09-07 14:57:46 -04:00
2012-07-14 16:34:47 +04:00
2012-10-06 03:05:16 +09:00
2012-10-09 16:22:19 +09:00
2012-10-09 16:22:19 +09:00
2012-03-20 21:29:46 -04:00
2012-10-06 03:05:16 +09:00
2012-05-06 13:43:41 +08:00
2012-03-20 21:29:46 -04:00
2012-04-20 17:29:13 -07:00
2012-03-20 21:48:21 +08:00
2012-08-25 11:36:43 -07:00
2012-08-02 09:50:39 +02:00
2012-10-08 06:36:39 +09:00
2011-12-13 11:18:17 -08:00
2012-10-06 03:05:17 +09:00
2012-10-02 20:25:04 -07:00
2012-10-02 21:35:55 -04:00
2012-10-06 03:05:16 +09:00
2012-10-06 03:05:15 +09:00
2012-10-02 20:25:04 -07:00
2012-02-28 19:31:58 -05:00
2012-08-09 15:23:09 +02:00
2011-05-25 08:39:26 -07:00
2012-05-31 17:49:32 -07:00
2012-10-06 03:05:00 +09:00
2012-10-09 16:22:42 +09:00
2012-09-26 22:20:20 -04:00
2012-09-26 22:20:08 -04:00
2012-07-16 08:33:14 -07:00
2012-10-02 21:38:48 -07:00
2012-09-26 21:10:06 -04:00
2012-01-03 22:52:39 -05:00
2012-07-14 16:32:47 +04:00
2012-10-08 06:36:39 +09:00
2012-09-18 01:01:35 -07:00
2012-10-09 16:22:39 +09:00
2012-07-31 09:40:38 +04:00
2012-09-26 22:20:08 -04:00
2012-05-30 08:52:42 -07:00
2012-03-21 13:36:41 -07:00
2012-10-06 03:05:15 +09:00
2012-09-05 10:59:30 +02:00
2012-09-26 22:20:08 -04:00
2012-10-06 03:05:15 +09:00
2011-05-25 08:39:26 -07:00
2012-07-14 16:32:48 +04:00
2012-02-28 19:31:58 -05:00
2012-10-02 20:25:04 -07:00
2012-09-22 20:48:18 -04:00
2012-10-02 20:25:04 -07:00
2012-09-26 21:08:52 -04:00
2012-07-14 16:37:27 +04:00
2012-01-03 22:57:11 -05:00
2012-09-18 01:01:35 -07:00
2012-07-14 16:32:48 +04:00
2012-10-02 21:35:55 -04:00
2012-10-02 21:35:55 -04:00
2012-09-26 22:20:08 -04:00
2012-09-26 22:20:08 -04:00
2012-08-14 21:47:55 -07:00
2012-09-26 22:20:08 -04:00
2012-09-26 22:20:08 -04:00
2012-02-28 19:31:58 -05:00
2012-10-02 20:25:04 -07:00
2012-09-26 22:20:08 -04:00
2012-10-06 03:04:56 +09:00
2012-09-26 22:20:08 -04:00
2012-09-26 22:20:08 -04:00
2012-09-26 22:20:08 -04:00
2012-09-18 01:01:35 -07:00
2012-10-02 21:38:48 -07:00