mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
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
Treehugger Robot
parent
724b50f143
commit
85a0c4bef6
@@ -137,6 +137,12 @@ enum pageflags {
|
|||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_KASAN_HW_TAGS
|
#ifdef CONFIG_KASAN_HW_TAGS
|
||||||
PG_skip_kasan_poison,
|
PG_skip_kasan_poison,
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_64BIT
|
||||||
|
PG_oem_reserved_1,
|
||||||
|
PG_oem_reserved_2,
|
||||||
|
PG_oem_reserved_3,
|
||||||
|
PG_oem_reserved_4,
|
||||||
#endif
|
#endif
|
||||||
__NR_PAGEFLAGS,
|
__NR_PAGEFLAGS,
|
||||||
|
|
||||||
|
|||||||
@@ -104,6 +104,12 @@
|
|||||||
#define IF_HAVE_PG_SKIP_KASAN_POISON(flag,string)
|
#define IF_HAVE_PG_SKIP_KASAN_POISON(flag,string)
|
||||||
#endif
|
#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_names \
|
#define __def_pageflag_names \
|
||||||
{1UL << PG_locked, "locked" }, \
|
{1UL << PG_locked, "locked" }, \
|
||||||
{1UL << PG_waiters, "waiters" }, \
|
{1UL << PG_waiters, "waiters" }, \
|
||||||
@@ -132,6 +138,10 @@ IF_HAVE_PG_HWPOISON(PG_hwpoison, "hwpoison" ) \
|
|||||||
IF_HAVE_PG_IDLE(PG_young, "young" ) \
|
IF_HAVE_PG_IDLE(PG_young, "young" ) \
|
||||||
IF_HAVE_PG_IDLE(PG_idle, "idle" ) \
|
IF_HAVE_PG_IDLE(PG_idle, "idle" ) \
|
||||||
IF_HAVE_PG_ARCH_2(PG_arch_2, "arch_2" ) \
|
IF_HAVE_PG_ARCH_2(PG_arch_2, "arch_2" ) \
|
||||||
|
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) \
|
||||||
IF_HAVE_PG_SKIP_KASAN_POISON(PG_skip_kasan_poison, "skip_kasan_poison")
|
IF_HAVE_PG_SKIP_KASAN_POISON(PG_skip_kasan_poison, "skip_kasan_poison")
|
||||||
|
|
||||||
#define show_page_flags(flags) \
|
#define show_page_flags(flags) \
|
||||||
|
|||||||
Reference in New Issue
Block a user