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 451571FE46D for ; Mon, 17 Nov 2025 01:31:19 +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=1763343079; cv=none; b=Hpy2NXR+hiADEmA0JBPLHVz9iT2vRKn2IssmWIMtjpTBTgDTEgSQL8I4mz9/87UfhYk660C9ySpBnUg1zCf3WNcDQ273hkpwiEz+CxwTWK9Pep0l64KvwRvupGUQnelgUpl3pF/vlsM7q18J8NsZK1khO+A8eyXoLHI207PqSFQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763343079; c=relaxed/simple; bh=b5A0fATQCVf+LZfIwXb0aPExGjDz0FnsymxHAPU1Zec=; h=Date:To:From:Subject:Message-Id; b=jrj5YDxgga1KN1NS4AjKVKnisZTcrEmKACfTAFQzydsGJKFOfWtW2TTzPVc7pmrv5u9Xg33lKcbNy1XW7s2yf1xBD6A+m/67/Z8/5CSg9/yCNUR6akMifDa5OQKlfO5br85vEfZEOvbEN1dfHffvAYvEiEOjshGk1Ca4T3NS3D4= 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=Uk0+7SjW; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="Uk0+7SjW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E685DC4CEF5; Mon, 17 Nov 2025 01:31:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1763343079; bh=b5A0fATQCVf+LZfIwXb0aPExGjDz0FnsymxHAPU1Zec=; h=Date:To:From:Subject:From; b=Uk0+7SjWveF0XEo1e7ItRMVx90hJxYeeCVzzdoEnvUBgUbyg9fQ5wMH6ngSMWJOYL lyshbAN68UDKLaiJNITmWi5GSy8RWiF2Zeg4af/1XWPwC0fBjXGSNWI+x8NBPK7lB9 SDdMp+ggqedJGdgmVKb6n8vA64LsvM2YRt91MoMI= Date: Sun, 16 Nov 2025 17:31:18 -0800 To: mm-commits@vger.kernel.org,ryabinin.a.a@gmail.com,mhocko@suse.com,mhocko@kernel.org,glider@google.com,elver@google.com,bhe@redhat.com,urezki@gmail.com,akpm@linux-foundation.org From: Andrew Morton Subject: [merged mm-stable] lib-test_vmalloc-add-no_block_alloc_test-case.patch removed from -mm tree Message-Id: <20251117013118.E685DC4CEF5@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The quilt patch titled Subject: lib/test_vmalloc: add no_block_alloc_test case has been removed from the -mm tree. Its filename was lib-test_vmalloc-add-no_block_alloc_test-case.patch This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: "Uladzislau Rezki (Sony)" Subject: lib/test_vmalloc: add no_block_alloc_test case Date: Tue, 7 Oct 2025 14:20:26 +0200 Patch series "__vmalloc()/kvmalloc() and no-block support", v4. This patch (of 10): Introduce a new test case "no_block_alloc_test" that verifies non-blocking allocations using __vmalloc() with GFP_ATOMIC and GFP_NOWAIT flags. It is recommended to build kernel with CONFIG_DEBUG_ATOMIC_SLEEP enabled to help catch "sleeping while atomic" issues. This test ensures that memory allocation logic under atomic constraints does not inadvertently sleep. Link: https://lkml.kernel.org/r/20251007122035.56347-2-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Cc: Baoquan He Cc: Michal Hocko Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Marco Elver Cc: Michal Hocko Signed-off-by: Andrew Morton --- lib/test_vmalloc.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) --- a/lib/test_vmalloc.c~lib-test_vmalloc-add-no_block_alloc_test-case +++ a/lib/test_vmalloc.c @@ -54,6 +54,7 @@ __param(int, run_test_mask, 7, "\t\tid: 256, name: kvfree_rcu_1_arg_vmalloc_test\n" "\t\tid: 512, name: kvfree_rcu_2_arg_vmalloc_test\n" "\t\tid: 1024, name: vm_map_ram_test\n" + "\t\tid: 2048, name: no_block_alloc_test\n" /* Add a new test case description here. */ ); @@ -283,6 +284,30 @@ static int fix_size_alloc_test(void) return 0; } +static int no_block_alloc_test(void) +{ + void *ptr; + int i; + + for (i = 0; i < test_loop_count; i++) { + bool use_atomic = !!(get_random_u8() % 2); + gfp_t gfp = use_atomic ? GFP_ATOMIC : GFP_NOWAIT; + unsigned long size = (nr_pages > 0 ? nr_pages : 1) * PAGE_SIZE; + + preempt_disable(); + ptr = __vmalloc(size, gfp); + preempt_enable(); + + if (!ptr) + return -1; + + *((__u8 *)ptr) = 0; + vfree(ptr); + } + + return 0; +} + static int pcpu_alloc_test(void) { @@ -411,6 +436,7 @@ static struct test_case_desc test_case_a { "kvfree_rcu_1_arg_vmalloc_test", kvfree_rcu_1_arg_vmalloc_test, }, { "kvfree_rcu_2_arg_vmalloc_test", kvfree_rcu_2_arg_vmalloc_test, }, { "vm_map_ram_test", vm_map_ram_test, }, + { "no_block_alloc_test", no_block_alloc_test, true }, /* Add a new test case here. */ }; _ Patches currently in -mm which might be from urezki@gmail.com are