+ mm-rmap-use-rmap_walk-in-try_to_unmap.patch added to -mm tree
[email protected]
maintainerSubject: + mm-rmap-use-rmap_walk-in-try_to_unmap.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Wed, 04 Dec 2013 14:16:47 -0800
The patch titled
Subject: mm/rmap: use rmap_walk() in try_to_unmap()
has been added to the -mm tree. Its filename is
mm-rmap-use-rmap_walk-in-try_to_unmap.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-rmap-use-rmap_walk-in-try_to_unmap.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-rmap-use-rmap_walk-in-try_to_unmap.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated there every 3-4 working days
------------------------------------------------------
From: Joonsoo Kim <[email protected]>
Subject: mm/rmap: use rmap_walk() in try_to_unmap()
Now, we have an infrastructure in rmap_walk() to handle difference from variants of rmap traversing functions.
So, just use it in try_to_unmap().
In this patch, I change following things.
1. enable rmap_walk() if !CONFIG_MIGRATION.
2. mechanical change to use rmap_walk() in try_to_unmap().
---
include/linux/rmap.h | 5 ---- mm/ksm.c | 4 +-- mm/rmap.c | 48 ++++++++++++++++++++++++++++++----------- 3 files changed, 39 insertions(+), 18 deletions(-)
include/linux/rmap.h renamed from include/linux/rmap.h~mm-rmap-use-rmap_walk-in-try_to_unmap +1 -4
@@ -190,7 +190,7 @@ int page_referenced_one(struct page *, sint try_to_unmap (struct page *,enum ttu_flags flags);int try_to_unmap_one (struct page *,struct vm_area_struct *, -unsigned long address,enum ttu_flags flags); +unsigned long address,void *arg);/* * Called from mm/filemap_xip.c to unmap empty zero page
@@ -256,9 +256,6 @@ struct rmap_walk_control { bool (*invalid_vma)(struct vm_area_struct *vma, void *arg); }; -/* -* Called by migrate.c to remove migration ptes, but might be used more later. -*/ int rmap_walk (struct page *page,struct rmap_walk_control *rwc);#else /* !CONFIG_MMU */
mm/ksm.c renamed from mm/ksm.c~mm-rmap-use-rmap_walk-in-try_to_unmap +2 -2
@@ -1982,7 +1982,7 @@ again:continue ; ret =try_to_unmap_one (page, vma, - rmap_item->address, flags); + rmap_item->address, (void *)flags);if (ret !=SWAP_AGAIN || !page_mapped (page)) {anon_vma_unlock_read (anon_vma); goto out;
@@ -1996,7 +1996,6 @@ out:return ret; } -#ifdef CONFIG_MIGRATION int rmap_walk_ksm (struct page *page,struct rmap_walk_control *rwc) {struct stable_node *stable_node;
@@ -2054,6 +2053,7 @@ out:return ret; } +#ifdef CONFIG_MIGRATION void ksm_migrate_page (struct page *newpage,struct page *oldpage) {struct stable_node *stable_node;
mm/rmap.c renamed from mm/rmap.c~mm-rmap-use-rmap_walk-in-try_to_unmap +36 -12
107 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are
mm-rmap-recompute-pgoff-for-huge-page.patch mm-rmap-factor-nonlinear-handling-out-of-try_to_unmap_file.patch mm-rmap-factor-lock-function-out-of-rmap_walk_anon.patch mm-rmap-make-rmap_walk-to-get-the-rmap_walk_control-argument.patch mm-rmap-extend-rmap_walk_xxx-to-cope-with-different-cases.patch mm-rmap-use-rmap_walk-in-try_to_unmap.patch mm-rmap-use-rmap_walk-in-try_to_munlock.patch mm-rmap-use-rmap_walk-in-page_referenced.patch mm-rmap-use-rmap_walk-in-page_mkclean.patch