ANDROID: GKI: Add pageflags for OEM
Add PG_oem_reserved_x pageflags for OEM on 64-bit platform. These new flags can be used to indicate different states of page. For example, we can use these pageflags to identify anonymous pages at different ZRAM compression rates. These flags will be used in conjunction with different Android application states. Therefore, I think this is not a generic modification for all Linux devices and is not suitable for upstream submission. Bug: 336964184 Change-Id: Ie68087248866af63ac516d96e3af85222e7a0b50 Signed-off-by: Xiaofeng Yuan <yuanxiaofeng@vivo.com>
This commit is contained in:
committed by
Suren Baghdasaryan
parent
a896c50860
commit
458d3138a5
@@ -128,6 +128,12 @@ enum pageflags {
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_USES_PG_ARCH_3
|
||||
PG_arch_3,
|
||||
#endif
|
||||
#ifdef CONFIG_64BIT
|
||||
PG_oem_reserved_1,
|
||||
PG_oem_reserved_2,
|
||||
PG_oem_reserved_3,
|
||||
PG_oem_reserved_4,
|
||||
#endif
|
||||
__NR_PAGEFLAGS,
|
||||
|
||||
|
||||
@@ -159,6 +159,12 @@ TRACE_DEFINE_ENUM(___GFP_LAST_BIT);
|
||||
#define IF_HAVE_PG_ARCH_3(_name)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
#define IF_HAVE_PG_OEM_RESERVED(_name) ,{1UL << PG_##_name, __stringify(_name)}
|
||||
#else
|
||||
#define IF_HAVE_PG_OEM_RESERVED(_name)
|
||||
#endif
|
||||
|
||||
#define DEF_PAGEFLAG_NAME(_name) { 1UL << PG_##_name, __stringify(_name) }
|
||||
|
||||
#define __def_pageflag_names \
|
||||
@@ -187,7 +193,11 @@ IF_HAVE_PG_HWPOISON(hwpoison) \
|
||||
IF_HAVE_PG_IDLE(idle) \
|
||||
IF_HAVE_PG_IDLE(young) \
|
||||
IF_HAVE_PG_ARCH_2(arch_2) \
|
||||
IF_HAVE_PG_ARCH_3(arch_3)
|
||||
IF_HAVE_PG_ARCH_3(arch_3) \
|
||||
IF_HAVE_PG_OEM_RESERVED(oem_reserved_1) \
|
||||
IF_HAVE_PG_OEM_RESERVED(oem_reserved_2) \
|
||||
IF_HAVE_PG_OEM_RESERVED(oem_reserved_3) \
|
||||
IF_HAVE_PG_OEM_RESERVED(oem_reserved_4)
|
||||
|
||||
#define show_page_flags(flags) \
|
||||
(flags) ? __print_flags(flags, "|", \
|
||||
|
||||
Reference in New Issue
Block a user