diff options
author | Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | 2015-05-14 01:01:44 +0000 |
---|---|---|
committer | Johannes Weiner <hannes@cmpxchg.org> | 2015-05-14 01:01:44 +0000 |
commit | b0e162a22e9841af657503a32da4041b1cf833e7 (patch) | |
tree | 04274079d08e99ab9a65396504764be88c567f7b | |
parent | f49ff8148f73053cb8cdd609c285b74d901aa97c (diff) | |
download | mm-next-b0e162a22e9841af657503a32da4041b1cf833e7.tar.gz |
page-flags: define behavior of LRU-related flags on compound pages
Only head pages are ever on LRU. Let's use HEAD policy to avoid any
confusion for all LRU-related flags.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Rik van Riel <riel@redhat.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Christoph Lameter <cl@linux.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Steve Capper <steve.capper@linaro.org>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | include/linux/page-flags.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index e95c2ac61fe2be..d31fba87c44c04 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -271,13 +271,14 @@ static inline struct page *compound_head_fast(struct page *page) __PAGEFLAG(Locked, locked, NO_TAIL) PAGEFLAG(Error, error, NO_COMPOUND) TESTCLEARFLAG(Error, error, NO_COMPOUND) -PAGEFLAG(Referenced, referenced, ANY) TESTCLEARFLAG(Referenced, referenced, ANY) - __SETPAGEFLAG(Referenced, referenced, ANY) +PAGEFLAG(Referenced, referenced, HEAD) + TESTCLEARFLAG(Referenced, referenced, HEAD) + __SETPAGEFLAG(Referenced, referenced, HEAD) PAGEFLAG(Dirty, dirty, HEAD) TESTSCFLAG(Dirty, dirty, HEAD) __CLEARPAGEFLAG(Dirty, dirty, HEAD) -PAGEFLAG(LRU, lru, ANY) __CLEARPAGEFLAG(LRU, lru, ANY) -PAGEFLAG(Active, active, ANY) __CLEARPAGEFLAG(Active, active, ANY) - TESTCLEARFLAG(Active, active, ANY) +PAGEFLAG(LRU, lru, HEAD) __CLEARPAGEFLAG(LRU, lru, HEAD) +PAGEFLAG(Active, active, HEAD) __CLEARPAGEFLAG(Active, active, HEAD) + TESTCLEARFLAG(Active, active, HEAD) __PAGEFLAG(Slab, slab, ANY) PAGEFLAG(Checked, checked, NO_COMPOUND) /* Used by some filesystems */ PAGEFLAG(Pinned, pinned, ANY) TESTSCFLAG(Pinned, pinned, ANY) /* Xen */ @@ -331,9 +332,9 @@ PAGEFLAG(SwapCache, swapcache, ANY) PAGEFLAG_FALSE(SwapCache) #endif -PAGEFLAG(Unevictable, unevictable, ANY) - __CLEARPAGEFLAG(Unevictable, unevictable, ANY) - TESTCLEARFLAG(Unevictable, unevictable, ANY) +PAGEFLAG(Unevictable, unevictable, HEAD) + __CLEARPAGEFLAG(Unevictable, unevictable, HEAD) + TESTCLEARFLAG(Unevictable, unevictable, HEAD) #ifdef CONFIG_MMU PAGEFLAG(Mlocked, mlocked, ANY) __CLEARPAGEFLAG(Mlocked, mlocked, ANY) |