blob: eed31dd8030cd79e482f731536e461f890ff5e67 [file] [log] [blame]
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Kalesh Singh <kaleshsingh@google.com>
Date: Thu, 23 Jul 2020 14:26:13 +0000
Subject: NOUPSTREAM: ANDROID: GKI: Don't compact data structures when
CONFIG_ZSMALLOC=n
In order to keep abi compatibility for vendor zsmalloc module, ensure
data structures are not compacted even if zsmalloc is disabled.
[CPNOTE: 02/07/21] Lee: Pinged the bug for status
[CPNOTE: 15/07/21] Lee: Will go away once ZRAM is part of GKI
Bug: 150917000
Change-Id: I8d5d85e50fa34204a48db67f2ae69eed591e8345
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
(cherry picked from commit caed3ce0f7ff8e031e5c9600a16c8fcc04c40ae7)
Signed-off-by: Lee Jones <joneslee@google.com>
---
include/linux/mmzone.h | 2 --
mm/vmstat.c | 2 --
2 files changed, 4 deletions(-)
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -148,9 +148,7 @@ enum zone_stat_item {
NR_MLOCK, /* mlock()ed pages found and moved off LRU */
/* Second 128 byte cacheline */
NR_BOUNCE,
-#if IS_ENABLED(CONFIG_ZSMALLOC)
NR_ZSPAGES, /* allocated in zsmalloc */
-#endif
NR_FREE_CMA_PAGES,
NR_VM_ZONE_STAT_ITEMS };
diff --git a/mm/vmstat.c b/mm/vmstat.c
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1176,9 +1176,7 @@ const char * const vmstat_text[] = {
"nr_zone_write_pending",
"nr_mlock",
"nr_bounce",
-#if IS_ENABLED(CONFIG_ZSMALLOC)
"nr_zspages",
-#endif
"nr_free_cma",
/* enum numa_stat_item counters */