From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52464C369AB for ; Fri, 18 Apr 2025 15:01:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 625A16B000D; Fri, 18 Apr 2025 11:01:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5D1326B0010; Fri, 18 Apr 2025 11:01:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 449EF6B0012; Fri, 18 Apr 2025 11:01:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 17CD56B000D for ; Fri, 18 Apr 2025 11:01:31 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id C72DE806DD for ; Fri, 18 Apr 2025 15:01:31 +0000 (UTC) X-FDA: 83347478382.12.ED804C2 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf13.hostedemail.com (Postfix) with ESMTP id B1AB62000F for ; Fri, 18 Apr 2025 15:01:29 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=QyTewrEm; dmarc=pass (policy=quarantine) header.from=redhat.com; spf=pass (imf13.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1744988490; a=rsa-sha256; cv=none; b=zRtZgpiasgVQAEmVbJ933Bc//3nuBZRUdfbwkbyVeBUHG/43vcY70Os8PpGB1gXE3Yvc49 D+nDufeBiqthVukl69jUSwkgaBJUl3jBneyUUIVe/i/yQHu/ihCGeD2tWV1TCUmEASI3g8 EyCwsuvR19vUxxbbL7Q8fReScu/7DCU= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=QyTewrEm; dmarc=pass (policy=quarantine) header.from=redhat.com; spf=pass (imf13.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1744988490; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=pRAvjPkxYPRRBD/GS3VWgx3W5DD4E26CuWLhjY+XoMQ=; b=JH0cgelR4GmwhLEszql7+wm32TWRGlirAr0Js7WB1Z4R6jlb7ftL0hnEf9rM4Il0KL2y1L WCpAJXncngt7pN/T6Fw2llYMCcL4x5fYOe1WnD8kk6wCyjViT0LhlFUuV0E6gzukh2kseB wAlWwlEshQ6rdYqhDPYsaQYu26NJl24= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1744988489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pRAvjPkxYPRRBD/GS3VWgx3W5DD4E26CuWLhjY+XoMQ=; b=QyTewrEmnmIKha9dhjeWj/HvltLaaMq5iokuHw+hIy2pNyQ9eBmRGHw6VQim9sVKpg9jNC LbU3bXqLuqbrox0hi/hVz6YliqXprRL24/NP7TGWPS8q1Gdw029Nn4iOcpU7SIkV+iyzYJ MJ+YAbCkkBQpMX45wXLE/3uhmGPu6AQ= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-564-IvsvK0IHPzGJ4ruXSllrCA-1; Fri, 18 Apr 2025 11:01:24 -0400 X-MC-Unique: IvsvK0IHPzGJ4ruXSllrCA-1 X-Mimecast-MFC-AGG-ID: IvsvK0IHPzGJ4ruXSllrCA_1744988482 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 714FB1800879; Fri, 18 Apr 2025 15:01:22 +0000 (UTC) Received: from localhost (unknown [10.72.112.18]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 40E181956054; Fri, 18 Apr 2025 15:01:20 +0000 (UTC) Date: Fri, 18 Apr 2025 23:01:17 +0800 From: Baoquan He To: "Uladzislau Rezki (Sony)" Cc: Andrew Morton , linux-mm@kvack.org, LKML , Christoph Hellwig , Oleksiy Avramchenko Subject: Re: [PATCH 2/4] lib/test_vmalloc.c: Allow built-in execution Message-ID: References: <20250417161216.88318-1-urezki@gmail.com> <20250417161216.88318-2-urezki@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250417161216.88318-2-urezki@gmail.com> X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Rspam-User: X-Rspamd-Queue-Id: B1AB62000F X-Rspamd-Server: rspam04 X-Stat-Signature: m6kfqnegpjnsg31ceu3i91j37hbrzccu X-HE-Tag: 1744988489-368036 X-HE-Meta: U2FsdGVkX1/z1tn/is2q9ZS7KOMy70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HMG++Oz8gHrChFakxG2p72EmLve5BVq72pXXkFx5rLGlNaQX6XfZvH4KBGJbN4J+3Og/2Tg/h/u2EVXk7Qnfzr1uodGGdK9QkOAz6V+rSAiQXAfXY7rANqE80d4BklEUHXDt6H+LVUQPTcBclPZRnOHC+O39eKrt8HsvgrqH+CoQEtTxCxx4OkfcEP8gluyV0n1TsjQ5F8TuQE/a02FhoWR1Hnn9C1vbsrmzEEQfoa8teldtEti7NXUyd97bMgFTupjgvzFuv6kaOzcKaNc5ISbWkNiVfpyqI5M+BfFZSJ+TElDpSBw/Fbs3dJnYq3pcIAjH0U744gp6uJqffGhmertjncIEqmbEuYITC4RxgWlyW/E1Uu7qxSYN5OE/fCzvyVY68Kn+jHwQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On 04/17/25 at 06:12pm, Uladzislau Rezki (Sony) wrote: > This patch removes the dependency on module loading ("m") > for the vmalloc test suite, enabling it to be built directly > into the kernel, so both ("=m") and ("=y") are supported. > > Motivation: > - Faster debugging/testing of vmalloc code; > - It allows to configure the test via kernel-boot parameters. > > Configuration example: > test_vmalloc.nr_threads=64 > test_vmalloc.run_test_mask=7 > test_vmalloc.sequential_test_order=1 > > Signed-off-by: Uladzislau Rezki (Sony) > --- > lib/Kconfig.debug | 3 +-- > lib/test_vmalloc.c | 5 +++-- > 2 files changed, 4 insertions(+), 4 deletions(-) Reviewed-by: Baoquan He > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index f9051ab610d54..166b9d830a85a 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -2574,8 +2574,7 @@ config TEST_BITOPS > config TEST_VMALLOC > tristate "Test module for stress/performance analysis of vmalloc allocator" > default n > - depends on MMU > - depends on m > + depends on MMU > help > This builds the "test_vmalloc" module that should be used for > stress and performance analysis. So, any new change for vmalloc > diff --git a/lib/test_vmalloc.c b/lib/test_vmalloc.c > index 4ab23e5e772d0..6d65ef725d42c 100644 > --- a/lib/test_vmalloc.c > +++ b/lib/test_vmalloc.c > @@ -591,10 +591,11 @@ static void do_concurrent_test(void) > kvfree(tdriver); > } > > -static int vmalloc_test_init(void) > +static int __init vmalloc_test_init(void) > { > do_concurrent_test(); > - return -EAGAIN; /* Fail will directly unload the module */ > + /* Fail will directly unload the module */ > + return IS_BUILTIN(CONFIG_TEST_VMALLOC) ? 0:-EAGAIN; > } > > module_init(vmalloc_test_init) > -- > 2.39.5 >