Re: [PATCH v5 0/8] mm/slab: introduce kfree_rcu_nolock() and improve slub_kunit coverage
From: Vlastimil Babka (SUSE)
Date: Wed Jul 29 2026 - 10:28:42 EST
On 7/29/26 10:20, Harry Yoo (Oracle) wrote:
...
> 8: 8e69c83a1e52 ! 8: aeaf2ab60046 slub_kunit: extend the test for kfree_rcu_nolock()
> @@ lib/tests/slub_kunit.c: struct test_nolock_context {
> - gfp_t gfp = (i % 2) ? GFP_KERNEL : GFP_KERNEL_ACCOUNT;
> + gfp_t gfp = (i & 1) ? GFP_KERNEL : GFP_KERNEL_ACCOUNT;
>
> - objects[j] = kmalloc_obj(*objects[j], gfp);
> +- objects[j] = kmalloc(64, gfp);
> ++ objects[j] = kmalloc_obj(*objects[j], gfp);
> if (!objects[j]) {
> + j--;
> + while (j >= 0)
> @@ lib/tests/slub_kunit.c: static void test_kmalloc_kfree(void)
> }
> }
>
> Link: https://lore.kernel.org/linux-mm/20260427-nolock-api-fix-v2-0-a6b83a92d9a4@xxxxxxxxxx [1]
> Link: https://lore.kernel.org/linux-mm/6edebc2b-5f5a-4b9c-9a4c-564310acee1b@xxxxxxxxxx [2]
> Acked-by: Vlastimil Babka (SUSE) <vbabka@xxxxxxxxxx>
> Signed-off-by: Harry Yoo (Oracle) <harry@xxxxxxxxxx>
> Link: https://lore.kernel.org/linux-mm/872bd673-3d45-4111-8a41-31185db3ece5@xxxxxxxxxx
> Signed-off-by: Harry Yoo (Oracle) <harry@xxxxxxxxxx>
> Link: https://lore.kernel.org/linux-mm/6811cc17-8ee4-48c8-8cbf-6bf4d9f98162@xxxxxxxxxx [1]
> Link: https://lore.kernel.org/linux-mm/40591888-3a87-433e-b3d2-cda1cab543be@xxxxxxxxxx [2]
> Suggested-by: Vlastimil Babka (SUSE) <vbabka@xxxxxxxxxx>
> Signed-off-by: Harry Yoo (Oracle) <harry@xxxxxxxxxx>
> Signed-off-by: Harry Yoo (Oracle) <harry@xxxxxxxxxx>
> Signed-off-by: Harry Yoo (Oracle) <harry@xxxxxxxxxx>
Wonder what produced this weird block of assorted trailers? "b4 prep
--compare-to vX" never did that for me?
> ---
> Harry Yoo (Oracle) (8):
> mm/slab, slub_kunit: register kprobe to trigger _nolock APIs
> mm/slab: handle the !allow_spin case in kfree_rcu_sheaf()
> mm/slab: use call_rcu() in unknown context if irqs are enabled
> mm/slab: extend deferred free mechanism to handle rcu sheaves
> mm/slab: allow kfree_rcu_sheaf() on PREEMPT_RT
> mm/slab: introduce struct kvfree_rcu_head for kvfree_rcu batching
> mm/slab: introduce kfree_rcu_nolock()
> slub_kunit: extend the test for kfree_rcu_nolock()
>
> include/linux/rcupdate.h | 32 ++++++-
> include/linux/slab.h | 16 +---
> include/linux/types.h | 8 ++
> include/trace/events/rcu.h | 2 +-
> lib/tests/slub_kunit.c | 190 ++++++++++++++++++++++++++++-----------
> mm/slab.h | 52 ++++++++++-
> mm/slab_common.c | 81 +++++++++++++----
> mm/slub.c | 220 ++++++++++++++++++++++++++++-----------------
> 8 files changed, 433 insertions(+), 168 deletions(-)
Applied to slab/for-7.3/kfree_rcu_nolock and merged go slab/for-next, thanks!
Used slab/for-next-fixes as a base for a better topic branch indepdencence.
> ---
> base-commit: ffc64805cebac330b2a60b2f1f144fcc35b8ab46
> change-id: 20260615-kfree_rcu_nolock-e5502555992f
>
> Best regards,