diff options
Diffstat (limited to 'include/linux/page-flags.h')
-rw-r--r-- | include/linux/page-flags.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index ec1a1baad348..b12f93a3c345 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -96,6 +96,7 @@ enum pageflags { | |||
96 | PG_swapbacked, /* Page is backed by RAM/swap */ | 96 | PG_swapbacked, /* Page is backed by RAM/swap */ |
97 | #ifdef CONFIG_UNEVICTABLE_LRU | 97 | #ifdef CONFIG_UNEVICTABLE_LRU |
98 | PG_unevictable, /* Page is "unevictable" */ | 98 | PG_unevictable, /* Page is "unevictable" */ |
99 | PG_mlocked, /* Page is vma mlocked */ | ||
99 | #endif | 100 | #endif |
100 | #ifdef CONFIG_IA64_UNCACHED_ALLOCATOR | 101 | #ifdef CONFIG_IA64_UNCACHED_ALLOCATOR |
101 | PG_uncached, /* Page has been mapped as uncached */ | 102 | PG_uncached, /* Page has been mapped as uncached */ |
@@ -232,7 +233,17 @@ PAGEFLAG_FALSE(SwapCache) | |||
232 | #ifdef CONFIG_UNEVICTABLE_LRU | 233 | #ifdef CONFIG_UNEVICTABLE_LRU |
233 | PAGEFLAG(Unevictable, unevictable) __CLEARPAGEFLAG(Unevictable, unevictable) | 234 | PAGEFLAG(Unevictable, unevictable) __CLEARPAGEFLAG(Unevictable, unevictable) |
234 | TESTCLEARFLAG(Unevictable, unevictable) | 235 | TESTCLEARFLAG(Unevictable, unevictable) |
236 | |||
237 | #define MLOCK_PAGES 1 | ||
238 | PAGEFLAG(Mlocked, mlocked) __CLEARPAGEFLAG(Mlocked, mlocked) | ||
239 | TESTSCFLAG(Mlocked, mlocked) | ||
240 | |||
235 | #else | 241 | #else |
242 | |||
243 | #define MLOCK_PAGES 0 | ||
244 | PAGEFLAG_FALSE(Mlocked) | ||
245 | SETPAGEFLAG_NOOP(Mlocked) TESTCLEARFLAG_FALSE(Mlocked) | ||
246 | |||
236 | PAGEFLAG_FALSE(Unevictable) TESTCLEARFLAG_FALSE(Unevictable) | 247 | PAGEFLAG_FALSE(Unevictable) TESTCLEARFLAG_FALSE(Unevictable) |
237 | SETPAGEFLAG_NOOP(Unevictable) CLEARPAGEFLAG_NOOP(Unevictable) | 248 | SETPAGEFLAG_NOOP(Unevictable) CLEARPAGEFLAG_NOOP(Unevictable) |
238 | __CLEARPAGEFLAG_NOOP(Unevictable) | 249 | __CLEARPAGEFLAG_NOOP(Unevictable) |
@@ -354,15 +365,17 @@ static inline void __ClearPageTail(struct page *page) | |||
354 | #endif /* !PAGEFLAGS_EXTENDED */ | 365 | #endif /* !PAGEFLAGS_EXTENDED */ |
355 | 366 | ||
356 | #ifdef CONFIG_UNEVICTABLE_LRU | 367 | #ifdef CONFIG_UNEVICTABLE_LRU |
357 | #define __PG_UNEVICTABLE (1 << PG_unevictable) | 368 | #define __PG_UNEVICTABLE (1 << PG_unevictable) |
369 | #define __PG_MLOCKED (1 << PG_mlocked) | ||
358 | #else | 370 | #else |
359 | #define __PG_UNEVICTABLE 0 | 371 | #define __PG_UNEVICTABLE 0 |
372 | #define __PG_MLOCKED 0 | ||
360 | #endif | 373 | #endif |
361 | 374 | ||
362 | #define PAGE_FLAGS (1 << PG_lru | 1 << PG_private | 1 << PG_locked | \ | 375 | #define PAGE_FLAGS (1 << PG_lru | 1 << PG_private | 1 << PG_locked | \ |
363 | 1 << PG_buddy | 1 << PG_writeback | \ | 376 | 1 << PG_buddy | 1 << PG_writeback | \ |
364 | 1 << PG_slab | 1 << PG_swapcache | 1 << PG_active | \ | 377 | 1 << PG_slab | 1 << PG_swapcache | 1 << PG_active | \ |
365 | __PG_UNEVICTABLE) | 378 | __PG_UNEVICTABLE | __PG_MLOCKED) |
366 | 379 | ||
367 | /* | 380 | /* |
368 | * Flags checked in bad_page(). Pages on the free list should not have | 381 | * Flags checked in bad_page(). Pages on the free list should not have |