BACKPORT: mm: multi-gen LRU: groundwork
[platform/kernel/linux-rpi.git] / include / linux / page-flags.h
index 4b5f95a..46674db 100644 (file)
@@ -828,7 +828,7 @@ static inline void ClearPageSlabPfmemalloc(struct page *page)
         1UL << PG_private      | 1UL << PG_private_2   |       \
         1UL << PG_writeback    | 1UL << PG_reserved    |       \
         1UL << PG_slab         | 1UL << PG_active      |       \
-        1UL << PG_unevictable  | __PG_MLOCKED)
+        1UL << PG_unevictable  | __PG_MLOCKED | LRU_GEN_MASK)
 
 /*
  * Flags checked when a page is prepped for return by the page allocator.
@@ -839,7 +839,7 @@ static inline void ClearPageSlabPfmemalloc(struct page *page)
  * alloc-free cycle to prevent from reusing the page.
  */
 #define PAGE_FLAGS_CHECK_AT_PREP       \
-       (((1UL << NR_PAGEFLAGS) - 1) & ~__PG_HWPOISON)
+       ((((1UL << NR_PAGEFLAGS) - 1) & ~__PG_HWPOISON) | LRU_GEN_MASK | LRU_REFS_MASK)
 
 #define PAGE_FLAGS_PRIVATE                             \
        (1UL << PG_private | 1UL << PG_private_2)