From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4F7CD3A4537 for ; Tue, 7 Apr 2026 09:43:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775555024; cv=none; b=FMI/fzSuonI4ZAshMv3vpefAr9Wwl4M9qORy6FRbMZOTIc41dDQuhXByFCL3dwlF7Xv5QYUAPZI9FMG91WyNeu77Oe73LuJkjD29nuDjNTQZSr58Ti6iBRexskB7gjLZRkDD/gFMtWw5mtPClgfK4dchS5PJt6FWvz1A+PX5vqU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775555024; c=relaxed/simple; bh=EwEjTTNP/TghfPguIZpceN9n0hrpprwTXMdl6yRuKtY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=mU1ItFrJuKRdjPLJVJedRO8BS0LB+5GySjTvfU3M2aY79jmxbLhWdFewOSotO2hM0H3OK83TWwVBHIUtrWzVuIMVjP07on5nHMnECd1yiHSTRKNLCc7ba2Wpc4JF1TP7PDmCgkxGiGIMiNNTAvYGZ10vcAFYK3NYUav9hHiS/Z4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Oy+fdGfT; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Oy+fdGfT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 216EEC2BCAF; Tue, 7 Apr 2026 09:43:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775555023; bh=EwEjTTNP/TghfPguIZpceN9n0hrpprwTXMdl6yRuKtY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Oy+fdGfT9pNC5sRTlF29VC+GlBoQy1TzjK2OKa7cDKDILyJ/QQU4PtTVuqOgLnkPC lG0PChHsApIeaWPgeBkskK3IM8HyKeC1OAvWVSnVRY7UDawSiNGKWkTbvqr/UDvlHq +FV15HMFE/gpdmPX3l4dWGUvuCvy4Nv/KN9LMp7dcCBg8AKqbQLgn5BhKOdPEm0aNE R4U0asPI8FtqJGqWrSCf11pqMpsSVwItkayno6xxGEIl5GmTeiwFrnU4LD+fdevo/R zrfKsLXfPy8a+Z8D/6TXxolno+qVnaPVIUfzDh9V5DX/GrBRIn4zYOkzUlu8Qkv2PX ud2wrkyYlYmbw== Message-ID: <2abd59ba-bdbe-4f5e-86b0-bf8edb908439@kernel.org> Date: Tue, 7 Apr 2026 11:43:40 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V2 0/2] slub_kunit: add a test case for {kmalloc,kfree}_nolock Content-Language: en-US To: "Harry Yoo (Oracle)" , Andrew Morton Cc: Hao Li , Christoph Lameter , David Rientjes , Roman Gushchin , Alexei Starovoitov , linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <20260406090907.11710-1-harry@kernel.org> From: "Vlastimil Babka (SUSE)" In-Reply-To: <20260406090907.11710-1-harry@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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