mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 11:54:14 -04:00
ANDROID: GKI: add fields required to enable CONFIG_TRANSPARENT_HUGEPAGE
Devices with plenty of RAM might benefit from THP usage. Added fields would allow to enable CONFIG_TRANSPARENT_HUGEPAGE without affecting ABI. Bug: 168269341 Signed-off-by: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ieb644a8da5377383d514197ee02d7bfd6f1d346d
This commit is contained in:
parent
0ce2100bcf
commit
7ee8b58cc1
11 changed files with 20 additions and 8 deletions
|
|
@ -94,6 +94,7 @@ CONFIG_MODVERSIONS=y
|
|||
CONFIG_BLK_INLINE_ENCRYPTION=y
|
||||
CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y
|
||||
CONFIG_GKI_HACKS_TO_FIX=y
|
||||
CONFIG_GKI_OPT_FEATURES=y
|
||||
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
|
||||
CONFIG_BINFMT_MISC=y
|
||||
CONFIG_MEMORY_HOTPLUG=y
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ CONFIG_MODVERSIONS=y
|
|||
CONFIG_BLK_INLINE_ENCRYPTION=y
|
||||
CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y
|
||||
CONFIG_GKI_HACKS_TO_FIX=y
|
||||
CONFIG_GKI_OPT_FEATURES=y
|
||||
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
|
||||
CONFIG_BINFMT_MISC=y
|
||||
CONFIG_CLEANCACHE=y
|
||||
|
|
|
|||
|
|
@ -309,6 +309,7 @@ static inline bool transhuge_vma_suitable(struct vm_area_struct *vma,
|
|||
}
|
||||
|
||||
static inline void prep_transhuge_page(struct page *page) {}
|
||||
static inline void free_transhuge_page(struct page *page) {}
|
||||
|
||||
#define transparent_hugepage_flags 0UL
|
||||
|
||||
|
|
|
|||
|
|
@ -330,7 +330,7 @@ struct mem_cgroup {
|
|||
struct list_head event_list;
|
||||
spinlock_t event_list_lock;
|
||||
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
#if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_GKI_OPT_FEATURES)
|
||||
struct deferred_split deferred_split_queue;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -799,7 +799,7 @@ enum compound_dtor_id {
|
|||
#ifdef CONFIG_HUGETLB_PAGE
|
||||
HUGETLB_PAGE_DTOR,
|
||||
#endif
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
#if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_GKI_OPT_FEATURES)
|
||||
TRANSHUGE_PAGE_DTOR,
|
||||
#endif
|
||||
NR_COMPOUND_DTORS,
|
||||
|
|
|
|||
|
|
@ -507,7 +507,8 @@ struct mm_struct {
|
|||
#ifdef CONFIG_MMU_NOTIFIER
|
||||
struct mmu_notifier_mm *mmu_notifier_mm;
|
||||
#endif
|
||||
#if defined(CONFIG_TRANSPARENT_HUGEPAGE) && !USE_SPLIT_PMD_PTLOCKS
|
||||
#if (defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_GKI_OPT_FEATURES)) && \
|
||||
!USE_SPLIT_PMD_PTLOCKS
|
||||
pgtable_t pmd_huge_pte; /* protected by page_table_lock */
|
||||
#endif
|
||||
#ifdef CONFIG_NUMA_BALANCING
|
||||
|
|
|
|||
|
|
@ -693,7 +693,7 @@ struct zonelist {
|
|||
extern struct page *mem_map;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
#if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_GKI_OPT_FEATURES)
|
||||
struct deferred_split {
|
||||
spinlock_t split_queue_lock;
|
||||
struct list_head split_queue;
|
||||
|
|
@ -781,7 +781,7 @@ typedef struct pglist_data {
|
|||
unsigned long first_deferred_pfn;
|
||||
#endif /* CONFIG_DEFERRED_STRUCT_PAGE_INIT */
|
||||
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
#if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_GKI_OPT_FEATURES)
|
||||
struct deferred_split deferred_split_queue;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
|
|||
UNEVICTABLE_PGMUNLOCKED,
|
||||
UNEVICTABLE_PGCLEARED, /* on COW, page truncate */
|
||||
UNEVICTABLE_PGSTRANDED, /* unable to isolate on unlock */
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
#if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_GKI_OPT_FEATURES)
|
||||
THP_FAULT_ALLOC,
|
||||
THP_FAULT_FALLBACK,
|
||||
THP_COLLAPSE_ALLOC,
|
||||
|
|
|
|||
|
|
@ -208,3 +208,11 @@ config GKI_HACKS_TO_FIX
|
|||
|
||||
Unless you are building a GKI kernel to be used with modules
|
||||
built from a different config, say N here.
|
||||
|
||||
config GKI_OPT_FEATURES
|
||||
bool "Optional GKI features"
|
||||
help
|
||||
Config option that should be enabled in GKI kernels to allow optional
|
||||
GKI features be enabled or disabled without ABI breakage.
|
||||
|
||||
If you are not building a GKI kernel, say N here.
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ compound_page_dtor * const compound_page_dtors[] = {
|
|||
#ifdef CONFIG_HUGETLB_PAGE
|
||||
free_huge_page,
|
||||
#endif
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
#if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_GKI_OPT_FEATURES)
|
||||
free_transhuge_page,
|
||||
#endif
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1253,7 +1253,7 @@ const char * const vmstat_text[] = {
|
|||
"unevictable_pgs_cleared",
|
||||
"unevictable_pgs_stranded",
|
||||
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
#if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_GKI_OPT_FEATURES)
|
||||
"thp_fault_alloc",
|
||||
"thp_fault_fallback",
|
||||
"thp_collapse_alloc",
|
||||
|
|
|
|||
Loading…
Reference in a new issue