On Thu, Apr 15, 2021 at 4:19 AM Wang Yugui <wangyugui@xxxxxxxxxxxx> wrote: > > Hi, > > This problem yet not happen when switched from > CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y > to > CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y > > so it seems a CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS related problem. _MADVISE means THP is not going to be used unless MADV_HUGEPAGE is called for some address areas. _ALWAYS means THP should be used whenever possible. So if your applications don't call madvise(MADV_HUGEPAGE) there should be no THP at all. And you could adjust the setting by manipulating /sys/kernel/mm/transparent_hugepage/enabled rather than reconfigure/rebuild the kernel. > > > $grep HUGE /boot/config-5.10.29-3.el7.x86_64 > > CONFIG_CGROUP_HUGETLB=y > > CONFIG_ARCH_WANT_GENERAL_HUGETLB=y > > CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION=y > > CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y > > CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD=y > > CONFIG_HAVE_ARCH_HUGE_VMAP=y > > CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y > > CONFIG_TRANSPARENT_HUGEPAGE=y > > # CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set > > CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y > > CONFIG_HUGETLBFS=y > > CONFIG_HUGETLB_PAGE=y > > Best Regards > Wang Yugui (wangyugui@xxxxxxxxxxxx) > 2021/04/15 > >