aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/page-flags.h
diff options
context:
space:
mode:
authorAndrea Arcangeli <aarcange@redhat.com>2011-01-13 18:46:32 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 20:32:38 -0500
commite9da73d67729b58bba256123e2b4651e0d8a01ac (patch)
tree5e7f8c4d394d625f7832cbd04a8d55f9f0cd0d95 /include/linux/page-flags.h
parenta826e422420b461a6247137c292ff83c4800354a (diff)
thp: compound_lock
Add a new compound_lock() needed to serialize put_page against __split_huge_page_refcount(). Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> Acked-by: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/page-flags.h')
-rw-r--r--include/linux/page-flags.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 4805fdec8d6e..5a743cc87238 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -108,6 +108,9 @@ enum pageflags {
108#ifdef CONFIG_MEMORY_FAILURE 108#ifdef CONFIG_MEMORY_FAILURE
109 PG_hwpoison, /* hardware poisoned page. Don't touch */ 109 PG_hwpoison, /* hardware poisoned page. Don't touch */
110#endif 110#endif
111#ifdef CONFIG_TRANSPARENT_HUGEPAGE
112 PG_compound_lock,
113#endif
111 __NR_PAGEFLAGS, 114 __NR_PAGEFLAGS,
112 115
113 /* Filesystems */ 116 /* Filesystems */
@@ -397,6 +400,12 @@ static inline void __ClearPageTail(struct page *page)
397#define __PG_MLOCKED 0 400#define __PG_MLOCKED 0
398#endif 401#endif
399 402
403#ifdef CONFIG_TRANSPARENT_HUGEPAGE
404#define __PG_COMPOUND_LOCK (1 << PG_compound_lock)
405#else
406#define __PG_COMPOUND_LOCK 0
407#endif
408
400/* 409/*
401 * Flags checked when a page is freed. Pages being freed should not have 410 * Flags checked when a page is freed. Pages being freed should not have
402 * these flags set. It they are, there is a problem. 411 * these flags set. It they are, there is a problem.
@@ -406,7 +415,8 @@ static inline void __ClearPageTail(struct page *page)
406 1 << PG_private | 1 << PG_private_2 | \ 415 1 << PG_private | 1 << PG_private_2 | \
407 1 << PG_buddy | 1 << PG_writeback | 1 << PG_reserved | \ 416 1 << PG_buddy | 1 << PG_writeback | 1 << PG_reserved | \
408 1 << PG_slab | 1 << PG_swapcache | 1 << PG_active | \ 417 1 << PG_slab | 1 << PG_swapcache | 1 << PG_active | \
409 1 << PG_unevictable | __PG_MLOCKED | __PG_HWPOISON) 418 1 << PG_unevictable | __PG_MLOCKED | __PG_HWPOISON | \
419 __PG_COMPOUND_LOCK)
410 420
411/* 421/*
412 * Flags checked when a page is prepped for return by the page allocator. 422 * Flags checked when a page is prepped for return by the page allocator.