summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBob Liu <bob.liu@oracle.com>2013-08-06 19:36:17 +0800
committerKyle Yan <kyan@codeaurora.org>2016-05-31 15:27:11 -0700
commit5248c3b4e4e57bd37aaa3a130a6038921becc89a (patch)
treeed1f113eef95df78d036c43e309f5d60e6ce229e /include
parenta851b0a3c8b41c0eea4bc6bd7587feada670a267 (diff)
mm: add WasActive page flag
Zcache could be ineffective if the compressed memory pool is full with compressed inactive file pages and most of them will be never used again. So we pick up pages from active file list only, those pages would probably be accessed again. Compress them in memory can reduce the latency significantly compared with rereading from disk. When a file page is shrunk from active file list to inactive file list, PageActive flag is also cleared. So adding an extra WasActive page flag for zcache to know whether the file page was shrunk from the active list. Change-Id: Ida1f4db17075d1f6f825ef7ce2b3bae4eb799e3f Signed-off-by: Bob Liu <bob.liu@oracle.com> Patch-mainline: linux-mm @ 2013-08-06 11:36:17 [vinmenon@codeaurora.org: trivial merge conflict fixes, checkpatch fixes, fix the definitions of was_active page flag so that it does not create compile time errors with CONFIG_CLEANCACHE disabled. Also remove the unnecessary use of PG_was_active in PAGE_FLAGS_CHECK_AT_PREP. Since was_active is a requirement for zcache, make the definitions dependent on CONFIG_ZCACHE rather than CONFIG_CLEANCACHE.] Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/page-flags.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index bb53c7b86315..4b115168607f 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -108,6 +108,9 @@ enum pageflags {
PG_young,
PG_idle,
#endif
+#ifdef CONFIG_ZCACHE
+ PG_was_active,
+#endif
__NR_PAGEFLAGS,
/* Filesystems */
@@ -224,6 +227,11 @@ PAGEFLAG(SwapBacked, swapbacked) __CLEARPAGEFLAG(SwapBacked, swapbacked)
__SETPAGEFLAG(SwapBacked, swapbacked)
__PAGEFLAG(SlobFree, slob_free)
+#ifdef CONFIG_ZCACHE
+PAGEFLAG(WasActive, was_active)
+#else
+PAGEFLAG_FALSE(WasActive)
+#endif
/*
* Private page markings that may be used by the filesystem that owns the page