Skip to contentSkip to conversation

+ mm-rmap-use-rmap_walk-in-try_to_munlock.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Dec 4, 2013

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: + mm-rmap-use-rmap_walk-in-try_to_munlock.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:48 -0800

The patch titled
Subject: mm/rmap: use rmap_walk() in try_to_munlock()
has been added to the -mm tree. Its filename is
mm-rmap-use-rmap_walk-in-try_to_munlock.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-rmap-use-rmap_walk-in-try_to_munlock.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-rmap-use-rmap_walk-in-try_to_munlock.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_munlock()

Now, we have an infrastructure in rmap_walk() to handle difference from variants of rmap traversing functions.

So, just use it in try_to_munlock().

In this patch, I change following things.

1. remove some variants of rmap traversing functions. cf> try_to_unmap_ksm, try_to_unmap_anon, try_to_unmap_file
2. mechanical change to use rmap_walk() in try_to_munlock().
3. copy and paste comments.

---

 include/linux/ksm.h |    6 -
 mm/ksm.c            |   50 -------------
 mm/rmap.c           |  154 +++++++++++-------------------------------
 3 files changed, 42 insertions(+), 168 deletions(-)
include/linux/ksm.h renamed from include/linux/ksm.h~mm-rmap-use-rmap_walk-in-try_to_munlock +0 -6
diff -puN include/linux/ksm.h~mm-rmap-use-rmap_walk-in-try_to_munlock include/linux/ksm.h
@@ -75,7 +75,6 @@ struct page *ksm_might_need_to_copy(stru
 
 int page_referenced_ksm(struct page *page,
 			struct mem_cgroup *memcg, unsigned long *vm_flags);
-int try_to_unmap_ksm(struct page *page, enum ttu_flags flags);
 int rmap_walk_ksm(struct page *page, struct rmap_walk_control *rwc);
 void ksm_migrate_page(struct page *newpage, struct page *oldpage);
 
@@ -113,11 +112,6 @@ static inline int page_referenced_ksm(st
 {
 	return 0;
 }
-
-static inline int try_to_unmap_ksm(struct page *page, enum ttu_flags flags)
-{
-	return 0;
-}
 
 static inline int rmap_walk_ksm(struct page *page,
 			struct rmap_walk_control *rwc)
mm/ksm.c renamed from mm/ksm.c~mm-rmap-use-rmap_walk-in-try_to_munlock +0 -50

56 lines not on this page · raw message

mm/rmap.c renamed from mm/rmap.c~mm-rmap-use-rmap_walk-in-try_to_munlock +42 -112

186 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