The patch titled Subject: mm/mglru: remove CONFIG_TRANSPARENT_HUGEPAGE has been added to the -mm mm-unstable branch. Its filename is mm-mglru-remove-config_transparent_hugepage.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-mglru-remove-config_transparent_hugepage.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Kinsey Ho <kinseyho@xxxxxxxxxx> Subject: mm/mglru: remove CONFIG_TRANSPARENT_HUGEPAGE Date: Wed, 27 Dec 2023 14:12:05 +0000 Improve code readability by removing CONFIG_TRANSPARENT_HUGEPAGE, since the compiler should be able to automatically optimize out the code that promotes THPs during page table walks. No functional changes. Link: https://lkml.kernel.org/r/20231227141205.2200125-6-kinseyho@xxxxxxxxxx Signed-off-by: Kinsey Ho <kinseyho@xxxxxxxxxx> Co-developed-by: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxx> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxx> Tested-by: Donet Tom <donettom@xxxxxxxxxxxxxxxxxx> Acked-by: Yu Zhao <yuzhao@xxxxxxxxxx> Cc: kernel test robot <lkp@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/vmscan.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) --- a/mm/vmscan.c~mm-mglru-remove-config_transparent_hugepage +++ a/mm/vmscan.c @@ -3273,7 +3273,6 @@ static unsigned long get_pte_pfn(pte_t p return pfn; } -#if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG) static unsigned long get_pmd_pfn(pmd_t pmd, struct vm_area_struct *vma, unsigned long addr) { unsigned long pfn = pmd_pfn(pmd); @@ -3291,7 +3290,6 @@ static unsigned long get_pmd_pfn(pmd_t p return pfn; } -#endif static struct folio *get_pfn_folio(unsigned long pfn, struct mem_cgroup *memcg, struct pglist_data *pgdat, bool can_swap) @@ -3394,7 +3392,6 @@ restart: return suitable_to_scan(total, young); } -#if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG) static void walk_pmd_range_locked(pud_t *pud, unsigned long addr, struct vm_area_struct *vma, struct mm_walk *args, unsigned long *bitmap, unsigned long *first) { @@ -3472,12 +3469,6 @@ next: done: *first = -1; } -#else -static void walk_pmd_range_locked(pud_t *pud, unsigned long addr, struct vm_area_struct *vma, - struct mm_walk *args, unsigned long *bitmap, unsigned long *first) -{ -} -#endif static void walk_pmd_range(pud_t *pud, unsigned long start, unsigned long end, struct mm_walk *args) @@ -3513,7 +3504,6 @@ restart: continue; } -#ifdef CONFIG_TRANSPARENT_HUGEPAGE if (pmd_trans_huge(val)) { unsigned long pfn = pmd_pfn(val); struct pglist_data *pgdat = lruvec_pgdat(walk->lruvec); @@ -3532,7 +3522,7 @@ restart: walk_pmd_range_locked(pud, addr, vma, args, bitmap, &first); continue; } -#endif + walk->mm_stats[MM_NONLEAF_TOTAL]++; if (should_clear_pmd_young()) { _ Patches currently in -mm which might be from kinseyho@xxxxxxxxxx are mm-mglru-add-config_arch_has_hw_pte_young.patch mm-mglru-add-config_lru_gen_walks_mmu.patch mm-mglru-remove-config_memcg.patch mm-mglru-add-dummy-pmd_dirty.patch mm-mglru-remove-config_transparent_hugepage.patch