diff options
author | Michel Lespinasse <walken@google.com> | 2012-10-08 19:31:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-09 03:22:42 -0400 |
commit | ed8ea8150182f8d715fceb3b175ef0a9ebacd872 (patch) | |
tree | 3af48f3a947df4dc5a0df660988f61d454a88cf2 /include | |
parent | 86c2ad19956f84f2191e062fcb979367b6365871 (diff) |
mm: add CONFIG_DEBUG_VM_RB build option
Add a CONFIG_DEBUG_VM_RB build option for the previously existing
DEBUG_MM_RB code. Now that Andi Kleen modified it to avoid using
recursive algorithms, we can expose it a bit more.
Also extend this code to validate_mm() after stack expansion, and to check
that the vma's start and last pgoffs have not changed since the nodes were
inserted on the anon vma interval tree (as it is important that the nodes
be reindexed after each such update).
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mm.h | 3 | ||||
-rw-r--r-- | include/linux/rmap.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 0cdab4e0f814..0e6f9c9f2123 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1386,6 +1386,9 @@ struct anon_vma_chain *anon_vma_interval_tree_iter_first( | |||
1386 | struct rb_root *root, unsigned long start, unsigned long last); | 1386 | struct rb_root *root, unsigned long start, unsigned long last); |
1387 | struct anon_vma_chain *anon_vma_interval_tree_iter_next( | 1387 | struct anon_vma_chain *anon_vma_interval_tree_iter_next( |
1388 | struct anon_vma_chain *node, unsigned long start, unsigned long last); | 1388 | struct anon_vma_chain *node, unsigned long start, unsigned long last); |
1389 | #ifdef CONFIG_DEBUG_VM_RB | ||
1390 | void anon_vma_interval_tree_verify(struct anon_vma_chain *node); | ||
1391 | #endif | ||
1389 | 1392 | ||
1390 | #define anon_vma_interval_tree_foreach(avc, root, start, last) \ | 1393 | #define anon_vma_interval_tree_foreach(avc, root, start, last) \ |
1391 | for (avc = anon_vma_interval_tree_iter_first(root, start, last); \ | 1394 | for (avc = anon_vma_interval_tree_iter_first(root, start, last); \ |
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index dce44f7d3ed8..b2cce644ffc7 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
@@ -66,6 +66,9 @@ struct anon_vma_chain { | |||
66 | struct list_head same_vma; /* locked by mmap_sem & page_table_lock */ | 66 | struct list_head same_vma; /* locked by mmap_sem & page_table_lock */ |
67 | struct rb_node rb; /* locked by anon_vma->mutex */ | 67 | struct rb_node rb; /* locked by anon_vma->mutex */ |
68 | unsigned long rb_subtree_last; | 68 | unsigned long rb_subtree_last; |
69 | #ifdef CONFIG_DEBUG_VM_RB | ||
70 | unsigned long cached_vma_start, cached_vma_last; | ||
71 | #endif | ||
69 | }; | 72 | }; |
70 | 73 | ||
71 | #ifdef CONFIG_MMU | 74 | #ifdef CONFIG_MMU |