The patch titled Subject: khugepaged: simplify the allocation of slab caches has been added to the -mm mm-unstable branch. Its filename is khugepaged-simplify-the-allocation-of-slab-caches.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/khugepaged-simplify-the-allocation-of-slab-caches.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: Hongfu Li <lihongfu@xxxxxxxxxx> Subject: khugepaged: simplify the allocation of slab caches Date: Tue, 18 Jun 2024 09:45:17 +0800 Use the new KMEM_CACHE() macro instead of direct kmem_cache_create to simplify the creation of SLAB caches. Link: https://lkml.kernel.org/r/20240618014517.25954-1-lihongfu@xxxxxxxxxx Signed-off-by: Hongfu Li <lihongfu@xxxxxxxxxx> Acked-by: David Hildenbrand <david@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/khugepaged.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/mm/khugepaged.c~khugepaged-simplify-the-allocation-of-slab-caches +++ a/mm/khugepaged.c @@ -385,10 +385,7 @@ int hugepage_madvise(struct vm_area_stru int __init khugepaged_init(void) { - mm_slot_cache = kmem_cache_create("khugepaged_mm_slot", - sizeof(struct khugepaged_mm_slot), - __alignof__(struct khugepaged_mm_slot), - 0, NULL); + mm_slot_cache = KMEM_CACHE(khugepaged_mm_slot, 0); if (!mm_slot_cache) return -ENOMEM; _ Patches currently in -mm which might be from lihongfu@xxxxxxxxxx are khugepaged-simplify-the-allocation-of-slab-caches.patch