Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12C553BBFAE for ; Thu, 4 Jun 2026 21:50:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780609809; cv=none; b=kM4o28wZW5ms6CglFSejpHmW9IapzPtPIhKmMiM+6LlZeo214HZUvVDAxKxxLkbSqibd8+otUnRj8pXnk3YeJBelWwygqjjYy527oMJgKg5kVbLxp9pa50onI6rVYl+g0jcEnPePyA+anjuI/Bgj2+Oh/ZbXCyNuG5mM/AWRPhs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780609809; c=relaxed/simple; bh=SUr4udK3WnlRPNvu6IGYwDEuwRiESgy9M1VEee348aM=; h=Date:To:From:Subject:Message-Id; b=KI7lIKZ0mzINMy31B4DWDs8g58DfPIckS8qlMMg8snyKBoT1vwl2LzdaRHoD/KDS7fyIcWJ5Iyb+JCJ5b5P2kXKbqSdqshKhxQ2R+6+uZ/l6MgDAbS8kd9m6Rbx1EjepGNleSRUSBLW584ug1YTePvoY57KruOJVlZVJtruneUg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=ej2lPCdl; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="ej2lPCdl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DCA741F00898; Thu, 4 Jun 2026 21:50:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1780609808; bh=UTYNeZ+GuXUDa8rszsR3hoSNq+pNq2Qigds+4L0TcRE=; h=Date:To:From:Subject; b=ej2lPCdlmOzNUQIboWCQwPbGaMtFIMXFw3GvdZpkOFAgNk/tqW8+UXH6Ls8Ep3AYJ i1h+ejfZn8Uk3YxLTwOfSkIlcLxHQJln5irFVi9oqG/1YxCTB+ZrkUOaGaTOQK6Pfl 9vEmjUxxUNcfFSu5wZ88UUbwPtKxRDzCcyi/i0jA= Date: Thu, 04 Jun 2026 14:50:07 -0700 To: mm-commits@vger.kernel.org,song@kernel.org,linan122@huawei.com,hch@lst.de,hch@infradead.org,hare@kernel.org,rppt@kernel.org,akpm@linux-foundation.org From: Andrew Morton Subject: [merged mm-nonmm-stable] raid6-use-kmalloc-in-raid6_select_algo.patch removed from -mm tree Message-Id: <20260604215007.DCA741F00898@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The quilt patch titled Subject: raid6: use kmalloc() in raid6_select_algo() has been removed from the -mm tree. Its filename was raid6-use-kmalloc-in-raid6_select_algo.patch This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: "Mike Rapoport (Microsoft)" Subject: raid6: use kmalloc() in raid6_select_algo() Date: Thu, 28 May 2026 12:53:01 +0300 raid6_select_algo() allocates 8 pages for buffer that is used as a scratch area for selection of the best algorithm. This buffer can be allocated with kmalloc() as there's nothing special about it to go directly to the page allocator. kmalloc() provides a better API than ancient __get_free_pages(). kmalloc() does not require ugly casts and kfree() does not need to know the size of the freed object. There is no performance difference because kmalloc() redirects allocations of such size to the page allocator. Replace __get_free_pages() call with kmalloc(). Link: https://lore.kernel.org/all/635405e4-9423-4a25-a6e7-e03c8ea0bcbe@redhat.com Link: https://lore.kernel.org/20260528-lib-v4-2-4e3ad1277279@kernel.org Signed-off-by: Mike Rapoport (Microsoft) Reviewed-by: Christoph Hellwig Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Li Nan Cc: Song Liu Signed-off-by: Andrew Morton --- lib/raid/raid6/algos.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/lib/raid/raid6/algos.c~raid6-use-kmalloc-in-raid6_select_algo +++ a/lib/raid/raid6/algos.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include "algos.h" @@ -153,7 +154,6 @@ EXPORT_SYMBOL_GPL(raid6_recov_datap); #define RAID6_TIME_JIFFIES_LG2 4 #define RAID6_TEST_DISKS 8 -#define RAID6_TEST_DISKS_ORDER 3 static int raid6_choose_gen(void *(*const dptrs)[RAID6_TEST_DISKS], const int disks) @@ -247,7 +247,7 @@ static int __init raid6_select_algo(void } /* prepare the buffer and fill it circularly with gfmul table */ - disk_ptr = (char *)__get_free_pages(GFP_KERNEL, RAID6_TEST_DISKS_ORDER); + disk_ptr = kmalloc(PAGE_SIZE * RAID6_TEST_DISKS, GFP_KERNEL); if (!disk_ptr) { pr_err("raid6: Yikes! No memory available.\n"); return -ENOMEM; @@ -269,7 +269,7 @@ static int __init raid6_select_algo(void /* select raid gen_syndrome function */ error = raid6_choose_gen(&dptrs, disks); - free_pages((unsigned long)disk_ptr, RAID6_TEST_DISKS_ORDER); + kfree(disk_ptr); return error; } _ Patches currently in -mm which might be from rppt@kernel.org are selftests-mm-hugetlb-read-hwpoison-add-sigbus-handler.patch selftests-mm-migration-dont-assume-huge-page-is-twomeg.patch selftests-mm-migration-make-nthreads-represent-number-of-working-threads.patch selftests-mm-migration-properly-cleanup-forked-processes.patch selftests-mm-run_vmtestssh-dont-gate-thp-and-ksm-tests-on-have_hugepages.patch selftests-mm-merge-map_hugetlb-into-hugepage-mmap.patch selftests-mm-rename-hugepage-tests-to-hugetlb.patch selftests-mm-hugetlb-shm-use-kselftest-framework.patch selftests-mm-hugetlb-vmemmap-use-kselftest-framework.patch selftests-mm-hugetlb-madvise-use-kselftest-framework.patch selftests-mm-hugetlb_madv_vs_map-use-kselftest-framework.patch selftests-mm-hugetlb-read-hwpoison-use-kselftest-framework.patch selftests-mm-khugepaged-group-tests-in-an-array.patch selftests-mm-khugepaged-use-ksefltest-framework.patch selftests-mm-khugepaged-use-ksefltest-framework-fix.patch selftests-mm-ksm_tests-use-kselftest-framework.patch selftests-mm-protection_keys-use-descriptive-test-names-in-the-output.patch selftests-mm-protection_keys-use-kselftest-framework.patch selftests-mm-uffd-common-use-kselftest-framework.patch selftests-mm-uffd-stress-use-kselftest-framework.patch selftests-mm-uffd-unit-tests-use-kselftest-framework.patch selftests-mm-va_high_addr_switch-use-kselftest-framework.patch selftests-mm-add-atexit-and-signal-handlers-to-thp_settings.patch selftests-mm-rename-thp_settings-to-hugepage_settings.patch selftests-mm-move-hugetlb-helpers-to-hugepage_settings.patch selftests-mm-hugepage_settings-use-unsigned-long-in-detect_hugetlb_page_size.patch selftests-mm-hugepage_settings-add-apis-to-get-and-set-nr_hugepages.patch selftests-mm-hugepage_settings-rename-and-rework-get_free_hugepages.patch selftests-mm-hugepage_settings-add-apis-for-hugetlb-setup-and-teardown.patch selftests-mm-move-read_file-read_num-and-write_num-to-vm_util.patch selftests-mm-vm_util-add-helpers-to-set-and-restore-shm-limits.patch selftests-mm-compaction_test-use-hugetlb-helpers.patch selftests-mm-cow-add-setup-of-hugetlb-pages.patch selftests-mm-gup_longterm-add-setup-of-hugetlb-pages.patch selftests-mm-gup_test-add-setup-of-hugetlb-pages.patch selftests-mm-hmm-tests-add-setup-of-hugetlb-pages.patch selftests-mm-hugepage_dio-add-setup-of-hugetlb-pages.patch selftests-mm-hugetlb_fault_after_madv-add-setup-of-hugetlb-pages.patch selftests-mm-hugetlb-madvise-add-setup-of-hugetlb-pages.patch selftests-mm-hugetlb_madv_vs_map-add-setup-of-hugetlb-pages.patch selftests-mm-hugetlb-mmap-add-setup-of-hugetlb-pages.patch selftests-mm-hugetlb-mremap-add-setup-of-hugetlb-pages.patch selftests-mm-hugetlb-shm-add-setup-of-hugetlb-pages.patch selftests-mm-hugetlb-soft-offline-add-setup-of-hugetlb-pages.patch selftests-mm-hugetlb-vmemmap-add-setup-of-hugetlb-pages.patch selftests-mm-migration-add-setup-of-hugetlb-pages.patch selftests-mm-pagemap_ioctl-add-setup-of-hugetlb-pages.patch selftests-mm-protection_keys-use-library-code-for-hugetlb-setup.patch selftests-mm-thuge-gen-add-setup-of-hugetlb-pages.patch selftests-mm-uffd-stress-use-hugetlb_save-and-alloc-huge-pages.patch selftests-mm-uffd-unit-tests-add-setup-of-hugetlb-pages.patch selftests-mm-uffd-wp-mremap-add-setup-of-hugetlb-pages.patch selftests-mm-va_high_addr_switch-add-setup-of-hugetlb-pages.patch selftests-mm-va_high_addr_switchsh-drop-huge-pages-setup.patch selftests-mm-run_vmtestssh-free-memory-if-available-memory-is-low.patch selftests-mm-run_vmtestssh-drop-detection-and-setup-of-hugetlb.patch