summaryrefslogtreecommitdiff
path: root/mm/debug.c
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 /mm/debug.c
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 'mm/debug.c')
-rw-r--r--mm/debug.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/debug.c b/mm/debug.c
index 668aa35191ca..5cf26f8c69a3 100644
--- a/mm/debug.c
+++ b/mm/debug.c
@@ -47,6 +47,9 @@ static const struct trace_print_flags pageflag_names[] = {
{1UL << PG_young, "young" },
{1UL << PG_idle, "idle" },
#endif
+#ifdef CONFIG_ZCACHE
+ {1UL << PG_was_active, "was_active" },
+#endif
};
static void dump_flags(unsigned long flags,