diff options
author | Wang, Yalin <Yalin.Wang@sonymobile.com> | 2015-02-11 18:24:51 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-11 20:06:00 -0500 |
commit | 56873f43abdcd574b25105867a990f067747b2f4 (patch) | |
tree | be55c69ee61da7b4e10e46c89e62a2ca68adaf81 /mm/huge_memory.c | |
parent | 1d148e218a0d0566b1c06f2f45f1436d53b049b2 (diff) |
mm:add KPF_ZERO_PAGE flag for /proc/kpageflags
Add KPF_ZERO_PAGE flag for zero_page, so that userspace processes can
detect zero_page in /proc/kpageflags, and then do memory analysis more
accurately.
Signed-off-by: Yalin Wang <yalin.wang@sonymobile.com>
Acked-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r-- | mm/huge_memory.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 817a875f2b8c..889713180980 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c | |||
@@ -171,12 +171,7 @@ static int start_khugepaged(void) | |||
171 | } | 171 | } |
172 | 172 | ||
173 | static atomic_t huge_zero_refcount; | 173 | static atomic_t huge_zero_refcount; |
174 | static struct page *huge_zero_page __read_mostly; | 174 | struct page *huge_zero_page __read_mostly; |
175 | |||
176 | static inline bool is_huge_zero_page(struct page *page) | ||
177 | { | ||
178 | return ACCESS_ONCE(huge_zero_page) == page; | ||
179 | } | ||
180 | 175 | ||
181 | static inline bool is_huge_zero_pmd(pmd_t pmd) | 176 | static inline bool is_huge_zero_pmd(pmd_t pmd) |
182 | { | 177 | { |