public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
To: "Harry Yoo (Oracle)" <harry@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Hao Li <hao.li@linux.dev>, Christoph Lameter <cl@gentwo.org>,
	David Rientjes <rientjes@google.com>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Alexei Starovoitov <ast@kernel.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH V2 0/2] slub_kunit: add a test case for {kmalloc,kfree}_nolock
Date: Tue, 7 Apr 2026 11:43:40 +0200	[thread overview]
Message-ID: <2abd59ba-bdbe-4f5e-86b0-bf8edb908439@kernel.org> (raw)
In-Reply-To: <20260406090907.11710-1-harry@kernel.org>

On 4/6/26 11:09, Harry Yoo (Oracle) wrote:
> Test bots don't seem to test kmalloc_nolock() and kfree_nolock(), so
> subtle bugs are discovered late. To make it easier to test, add a kunit
> test case that stresses these paths by combining a tight alloc/free loop
> with perf-triggered interrupts that invoke {kmalloc,kfree}_nolock() from
> the overflow handler.
> 
> While at it, also add the missing MAINTAINERS entry for slub_kunit.c.

While it's late, this only adds a tests, so added to slab/for-next, thanks!

> v1->v2:
>   - Fix build errors on arches without CONFIG_PERF_EVENTS (Thanks
>     Vlastimil)
>   - Rename some identifiers
>   - Use GFP_KERNEL_ACCOUNT or GFP_KERNEL for kmalloc(), instead of 0 or
>     __GFP_ACCOUNT (that was unnecessarily restrictive).
> 
> p.s. I was writing this test while developing kvfree_rcu_nolock(),
> let's add a test case in advance.
> 
> Probably a similar test case for the page allocator is worth adding
> but I'm not sure where the right place would be.

lib/tests/page_alloc_kunit.c? ;)

> 
> v1: https://lore.kernel.org/linux-mm/20260330120517.104743-1-harry@kernel.org
> 
> Harry Yoo (Oracle) (2):
>   MAINTAINERS: add lib/tests/slub_kunit.c to SLAB ALLOCATOR section
>   lib/tests/slub_kunit: add a test case for {kmalloc,kfree}_nolock
> 
>  MAINTAINERS            |  1 +
>  lib/tests/slub_kunit.c | 92 ++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 93 insertions(+)
> 
> 
> base-commit: dbc785fb4d9cfa0115e69e614fe20b4ab90f8366


      parent reply	other threads:[~2026-04-07  9:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-06  9:09 [PATCH V2 0/2] slub_kunit: add a test case for {kmalloc,kfree}_nolock Harry Yoo (Oracle)
2026-04-06  9:09 ` [PATCH V2 1/2] MAINTAINERS: add lib/tests/slub_kunit.c to SLAB ALLOCATOR section Harry Yoo (Oracle)
2026-04-07  0:19   ` SeongJae Park
2026-04-06  9:09 ` [PATCH V2 2/2] lib/tests/slub_kunit: add a test case for {kmalloc,kfree}_nolock Harry Yoo (Oracle)
2026-04-07  9:43 ` Vlastimil Babka (SUSE) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2abd59ba-bdbe-4f5e-86b0-bf8edb908439@kernel.org \
    --to=vbabka@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=ast@kernel.org \
    --cc=cl@gentwo.org \
    --cc=hao.li@linux.dev \
    --cc=harry@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox