summaryrefslogtreecommitdiff
path: root/include/linux/page-flags.h
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-09-08 01:01:14 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-09-08 01:01:14 -0300
commite5fd91f1ef340da553f7a79da9540c3db711c937 (patch)
treeb11842027dc6641da63f4bcc524f8678263304a3 /include/linux/page-flags.h
parent2a9b0348e685a63d97486f6749622b61e9e3292f (diff)
Linux-libre 4.2-gnu
Diffstat (limited to 'include/linux/page-flags.h')
-rw-r--r--include/linux/page-flags.h32
1 files changed, 7 insertions, 25 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 6d4f3fc5e..41c93844f 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -109,12 +109,6 @@ enum pageflags {
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
PG_compound_lock,
#endif
-#ifdef CONFIG_TOI_INCREMENTAL
- PG_toi_untracked, /* Don't track dirtiness of this page - assume always dirty */
- PG_toi_ro, /* Page was made RO by TOI */
- PG_toi_cbw, /* Copy the page before it is written to */
- PG_toi_dirty, /* Page has been modified */
-#endif
__NR_PAGEFLAGS,
/* Filesystems */
@@ -294,17 +288,6 @@ TESTSCFLAG(HWPoison, hwpoison)
PAGEFLAG_FALSE(HWPoison)
#define __PG_HWPOISON 0
#endif
-#ifdef CONFIG_TOI_INCREMENTAL
-PAGEFLAG(TOI_RO, toi_ro)
-PAGEFLAG(TOI_Dirty, toi_dirty)
-PAGEFLAG(TOI_Untracked, toi_untracked)
-PAGEFLAG(TOI_CBW, toi_cbw)
-#else
-PAGEFLAG_FALSE(TOI_RO)
-PAGEFLAG_FALSE(TOI_Dirty)
-PAGEFLAG_FALSE(TOI_Untracked)
-PAGEFLAG_FALSE(TOI_CBW)
-#endif
/*
* On an anonymous page mapped into a user virtual memory area,
@@ -648,20 +631,19 @@ static inline void ClearPageSlabPfmemalloc(struct page *page)
1 << PG_private | 1 << PG_private_2 | \
1 << PG_writeback | 1 << PG_reserved | \
1 << PG_slab | 1 << PG_swapcache | 1 << PG_active | \
- 1 << PG_unevictable | __PG_MLOCKED | __PG_HWPOISON | \
+ 1 << PG_unevictable | __PG_MLOCKED | \
__PG_COMPOUND_LOCK)
/*
* Flags checked when a page is prepped for return by the page allocator.
- * Pages being prepped should not have any flags set. It they are set,
+ * Pages being prepped should not have these flags set. It they are set,
* there has been a kernel bug or struct page corruption.
+ *
+ * __PG_HWPOISON is exceptional because it needs to be kept beyond page's
+ * alloc-free cycle to prevent from reusing the page.
*/
-#ifdef CONFIG_TOI_INCREMENTAL
-#define PAGE_FLAGS_CHECK_AT_PREP (((1 << NR_PAGEFLAGS) - 1) & \
- ~((1 << PG_toi_dirty) | (1 << PG_toi_ro)))
-#else
-#define PAGE_FLAGS_CHECK_AT_PREP ((1 << NR_PAGEFLAGS) - 1)
-#endif
+#define PAGE_FLAGS_CHECK_AT_PREP \
+ (((1 << NR_PAGEFLAGS) - 1) & ~__PG_HWPOISON)
#define PAGE_FLAGS_PRIVATE \
(1 << PG_private | 1 << PG_private_2)