From: Minchan Kim <minchan.kim@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>
Cc: Minchan Kim <minchan.kim@gmail.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: [PATCH 1/3 -mmotm-2009-12-10-17-19] Move functions related to zero page
Date: Sat, 21 Nov 2009 12:24:18 +0900 [thread overview]
Message-ID: <ceeec51bdc2be64416e05ca16da52a126b598e17.1258773030.git.minchan.kim@gmail.com> (raw)
This patch moves is_zero_pfn and my_zero_pfn to mm.h
for other use case.
This patch has no side effect and helps following patches.
Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
---
include/linux/mm.h | 15 +++++++++++++++
mm/memory.c | 14 --------------
2 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index be7f851..71bacd1 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -751,6 +751,21 @@ struct zap_details {
unsigned long truncate_count; /* Compare vm_truncate_count */
};
+#ifndef is_zero_pfn
+extern unsigned long zero_pfn;
+static inline int is_zero_pfn(unsigned long pfn)
+{
+ return pfn == zero_pfn;
+}
+#endif
+
+#ifndef my_zero_pfn
+static inline unsigned long my_zero_pfn(unsigned long addr)
+{
+ return zero_pfn;
+}
+#endif
+
struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr,
pte_t pte);
diff --git a/mm/memory.c b/mm/memory.c
index 09e4b1b..3743fb5 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -457,20 +457,6 @@ static inline int is_cow_mapping(unsigned int flags)
return (flags & (VM_SHARED | VM_MAYWRITE)) == VM_MAYWRITE;
}
-#ifndef is_zero_pfn
-static inline int is_zero_pfn(unsigned long pfn)
-{
- return pfn == zero_pfn;
-}
-#endif
-
-#ifndef my_zero_pfn
-static inline unsigned long my_zero_pfn(unsigned long addr)
-{
- return zero_pfn;
-}
-#endif
-
/*
* vm_normal_page -- This function gets the "struct page" associated with a pte.
*
--
1.5.6.5
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2009-12-28 10:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-21 3:24 Minchan Kim [this message]
2009-11-21 3:24 ` [PATCH 2/3 -mmotm-2009-12-10-17-19] Count zero page as file_rss Minchan Kim
2009-11-21 3:24 ` [PATCH 3/3 -mmotm-2009-12-10-17-19] Fix wrong rss counting of smap Minchan Kim
2009-12-28 10:25 ` Minchan Kim
2009-12-28 10:24 ` [PATCH 2/3 -mmotm-2009-12-10-17-19] Count zero page as file_rss Minchan Kim
2009-12-30 16:49 ` Hugh Dickins
2009-12-31 2:41 ` Minchan Kim
2009-12-31 8:43 ` Hugh Dickins
2010-01-04 0:49 ` Minchan Kim
2010-01-03 23:43 ` KAMEZAWA Hiroyuki
2010-01-04 0:47 ` Minchan Kim
2009-12-28 10:23 ` [PATCH 1/3 -mmotm-2009-12-10-17-19] Move functions related to zero page Minchan Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ceeec51bdc2be64416e05ca16da52a126b598e17.1258773030.git.minchan.kim@gmail.com \
--to=minchan.kim@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox