Rename from dynamic hugetlb(OLK_5.10) to dynamic pool.
A per-memcg pagepool. The task in the memcg will prefer to alloc pages from corresponding pool.
Liu Shixin (26): mm/memcg: introduce mem_cgroup_scan_cgroups to scan all memcgs mm/memcg: introduce memcg_has_children to check memcg mm/dynamic_pool: introduce per-memcg memory pool mm/dynamic_pool: introduce PG_dpool to mark free pages in dpool mm/dynamic_pool: introduce PG_pool to mark pages allocated from dpool mm/dynamic_pool: create dpool by dhugetlb.nr_pages interface mm/dynamic_pool: fill dpool with HugeTLB 1G pages mm/dynamic_pool: add interface to configure the count of hugepages mm/dynamic_pool: add restore_pool ops to reclaim memory and restore hugepages mm/dynamic_pool: support to flow pages between 1G and 2M pages pool mm/dynamic_pool: support to flow pages between 2M and 4K pages pool mm/dynamic_pool: migrate used pages before promote to huge page mm/dynamic_pool: call mem_cgroup_force_empty before restore pool mm/dynamic_pool: prevent task attach to another dpool mm/dynamic_pool: support page allocation from dpool mm/dynamic_pool: speed up allocation by percpu pages pool mm/dynamic_pool: check resv for HugeTLB allocation from dpool mm/dynamic_pool: support HugeTLB page allocation from dpool mm/dynamic_pool: add tracepoints for dpool mm/dynamic_pool: fill dpool with pagelist mm/dynamic_pool: disable THP for task attached with dpool mm/dynamic_pool: compatible with HugeTLB dissolve mm/dynamic_pool: compatible with HugeTLB Vmemmap mm/dynamic_pool: compatible with memory hwpoison mm/dynamic_pool: add Document for dynamic hugetlb feature mm/dynamic_pool: enable CONFIG_DYNAMIC_POOL on x86_64 and arm64 by default
Documentation/mm/dynamic_hugetlb.rst | 100 ++ arch/arm64/configs/openeuler_defconfig | 1 + arch/x86/configs/openeuler_defconfig | 1 + fs/hugetlbfs/inode.c | 5 + fs/proc/meminfo.c | 3 + fs/proc/page.c | 3 + include/linux/dynamic_pool.h | 227 ++++ include/linux/hugetlb.h | 11 + include/linux/memcontrol.h | 21 + include/linux/memory_hotplug.h | 5 + include/linux/mm.h | 1 + include/linux/page-flags.h | 22 + include/ras/ras_event.h | 1 + include/trace/events/dynamic_pool.h | 174 +++ include/trace/events/mmflags.h | 7 + include/uapi/linux/kernel-page-flags.h | 1 + kernel/cgroup/cgroup.c | 12 + mm/Kconfig | 9 + mm/Makefile | 1 + mm/dynamic_pool.c | 1730 ++++++++++++++++++++++++ mm/hugetlb.c | 103 +- mm/hugetlb_vmemmap.c | 4 + mm/internal.h | 6 + mm/khugepaged.c | 18 + mm/memcontrol.c | 120 +- mm/memory-failure.c | 16 +- mm/memory.c | 7 +- mm/memory_hotplug.c | 2 +- mm/page_alloc.c | 28 +- mm/shmem.c | 3 + mm/show_mem.c | 2 + tools/mm/page-types.c | 1 + 32 files changed, 2606 insertions(+), 39 deletions(-) create mode 100644 Documentation/mm/dynamic_hugetlb.rst create mode 100644 include/linux/dynamic_pool.h create mode 100644 include/trace/events/dynamic_pool.h create mode 100644 mm/dynamic_pool.c