summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2004-08-23 21:24:46 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-23 21:24:46 -0700
commit6992904141794e1d5f6ef2e9b770ba491550a237 (patch)
tree07fd2e4dec00ab9ae701a6c540621f9e7d8e73e6 /include/linux
parent9d9ae43b26ac90bab0213b8bb1245ac9ef966a97 (diff)
[PATCH] rmaplock: swapoff use anon_vma
Swapoff can make good use of a page's anon_vma and index, while it's still left in swapcache, or once it's brought back in and the first pte mapped back: unuse_vma go directly to just one page of only those vmas with the same anon_vma. And unuse_process can skip any vmas without an anon_vma (extending the hugetlb check: hugetlb vmas have no anon_vma). This just hacks in on top of the existing procedure, still going through all the vmas of all the mms in mmlist. A more elegant procedure might replace mmlist by a list of anon_vmas: but that would be more work to implement, with apparently more overhead in the common paths. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/rmap.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index d8aa006a5fe5..291d36c9e987 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -91,6 +91,11 @@ static inline void page_dup_rmap(struct page *page)
int page_referenced(struct page *, int is_locked);
int try_to_unmap(struct page *);
+/*
+ * Used by swapoff to help locate where page is expected in vma.
+ */
+unsigned long page_address_in_vma(struct page *, struct vm_area_struct *);
+
#else /* !CONFIG_MMU */
#define anon_vma_init() do {} while (0)