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 39A81C71136 for ; Fri, 13 Jun 2025 14:37:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CC7D66B0089; Fri, 13 Jun 2025 10:37:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C79476B008A; Fri, 13 Jun 2025 10:37:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B6A056B008C; Fri, 13 Jun 2025 10:37:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 958536B0089 for ; Fri, 13 Jun 2025 10:37:32 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 462A51D4D24 for ; Fri, 13 Jun 2025 14:37:32 +0000 (UTC) X-FDA: 83550630744.26.98348F8 Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by imf19.hostedemail.com (Postfix) with ESMTP id 4AF241A0002 for ; Fri, 13 Jun 2025 14:37:29 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=NloZWFaa; spf=pass (imf19.hostedemail.com: domain of urezki@gmail.com designates 209.85.167.49 as permitted sender) smtp.mailfrom=urezki@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1749825450; 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=Uu1G+SQJ1DuRMAhemAW/AQY62352EzXJpJcvthzSRL4=; b=BxNyUeC7JiDaJNcavpYjeGKiXs1QagJ1A8k9gSdbzf6gVhf/TL1woBlT1waLtaxVg9a225 qfq0KgqnGx8KuipMd1Q3Iwd/OXOYFz3ENuvtzoo5V9JL8z6DrE2M/1YQBOwtRBiPBZzGgv f9zd/9PLUvMAA0W1uupx/Yx12Qp+40A= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=NloZWFaa; spf=pass (imf19.hostedemail.com: domain of urezki@gmail.com designates 209.85.167.49 as permitted sender) smtp.mailfrom=urezki@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1749825450; a=rsa-sha256; cv=none; b=k5SopyGRhzIM+MyDb4OetRnvE2SgtvIduUPWZA74MjCcUBo2TR9Et9Z1ljW28HE/031oek o6iZj+ZsoSh55nmNXH2fSpyJNFPoNdFFStmQyvnFElDZfisw64Cn4JOgXT+SFQpKKi4JvV k5IU08IqKn3LhKomHYRLL0w9hkwaUf0= Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-55342bca34eso2655472e87.2 for ; Fri, 13 Jun 2025 07:37:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1749825448; x=1750430248; darn=kvack.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=Uu1G+SQJ1DuRMAhemAW/AQY62352EzXJpJcvthzSRL4=; b=NloZWFaaI0e7iVgcKDu8h5e51NaMEbMO0oiQn25yyTdjJFcr2Nd1gC8Wxh3JL4b2eP rKYvc9TPQO4op/oRLY84U9oOHggRvBcRHqwWVwaxWd7Tg7rTlcPywZ/1qca22znFaCEM WlItG8GG61x/4EfVEO0fcWEI2dR+y7VSkBhyFY8FQ9eJz6L+mmGcOmDAwxsrKUbkaV1S L81/llMh1/al3ReR3qX5GTQTChqCEwtCRs3ePJNeXqs6DNSP+csTJNjq3VNXjGopB3gN utdut4x2OyJME5LAg15HoJBWXI4H2AY1ALYBjeVV28Cu49x5zMpNCYoFYWF8faSB3kzR SB4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749825448; x=1750430248; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Uu1G+SQJ1DuRMAhemAW/AQY62352EzXJpJcvthzSRL4=; b=KGgWqcJJYlcI+A+wruEqvJ7z1UGbyfu4+LUdSJdlHVFWCdhYYRa0Od0b1Q+BdHcOSQ VH8a9sn9DuwO/Z+83vZL3x0yaPifvHjGdiGqE/x3j8Q7L1cZKqemHedPuFD9K3mxljIp jF+dR3xAJrFy9ukmrhY+QcUbvqzWpfLSFU4WjPDXyR0muf8DHK06nQOqpDzZ7gCNn83h EDZgAUhZ6Ebtvb+gwe+79W9aF8kvjwfEh/OR+lFzsXOj2Fk1w6Ehou45elhmJ38pZllk tePApjYubGcDtwfhClagsKMIIkViyKghj2iyvsHeQIxa+lzlVRZCIlq0gXkw9guR6UpK 7tXA== X-Forwarded-Encrypted: i=1; AJvYcCXFOtXhvPGfhq8bFJxlu5anNJd81GGWks9B+pwBzjMkzynszg6os+WGCfLn86+BMlOl9pvWDWSQ+w==@kvack.org X-Gm-Message-State: AOJu0Yy4sQgtBmTTxHubp7wYaot6aBl+AGqS4uwik3Xzc6VA6rkcATHI 65BMYiENhtfVkEJd7VQL3oGNnQVTij2Vmh18LboG6LELbQNpG/LLjado X-Gm-Gg: ASbGncuxTAS+yvAPtIYtndVFsbrsMKJiGf9Ut2HzRQCfT3Cu85ezncfY4lnT2gZLBIo K35ki2a/O3j3rJAGm6OpqdYoVc/L/ahqMmkYvmQ3OI6vO4mg7unxMrtrl6gsFjfqLWwhwqp+sz9 SejTGsCZodoLa57/bHyA969XieR0Bq7ZR+A9lGzinpM9ALz9SUkXt0FNeu5jVIYd5lbB+FnxvnP TvHlBIB+A4rD5cxxrAougjrgj3QszTFGmDAWYDyE3ikgstZpR0fXnF3rnRhrNOvmJnetAuEpotM aw4rIby2XjDT7mUm5/85BcNmxewd391E2PMiCPZvWX0Cd8+8N1UGZjw2YqtwcyS3tHYsdz4AZzC raTBm3I94dxA= X-Google-Smtp-Source: AGHT+IEkIk0dEKOFUeh/GwDHrOZIugerDoRoGntqT8Wj6lNCazDx8i2ckdOJyKKNFIegb4Z8x+/ylA== X-Received: by 2002:a05:6512:3990:b0:553:277b:17b5 with SMTP id 2adb3069b0e04-553af95f8bbmr811633e87.30.1749825448276; Fri, 13 Jun 2025 07:37:28 -0700 (PDT) Received: from pc636 (host-95-203-1-180.mobileonline.telia.com. [95.203.1.180]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-553ac1d7278sm469682e87.175.2025.06.13.07.37.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jun 2025 07:37:27 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Fri, 13 Jun 2025 16:37:25 +0200 To: Dev Jain Cc: Uladzislau Rezki , Andrew Morton , linux-mm@kvack.org, LKML , Baoquan He , Christoph Hellwig , Oleksiy Avramchenko , Ryan Roberts 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> <6c6f1cfa-7f1b-4133-ae2a-c6b1ef2d82e8@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Stat-Signature: 8qayboq3a87wre86phm5pgtr3u63ri7i X-Rspamd-Queue-Id: 4AF241A0002 X-Rspam-User: X-Rspamd-Server: rspam09 X-HE-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KWqSxuTtv0ZRgSlFvqMYJkrpiaB/VuRqNZmSVny10HoNhN82lKFEY8x8T8j5IsGE+XK5HRZKCzO36o2V28yKetTV7YA3s6EjBv25IfpwpDNwA6uzHInovEA6bmdLpWRGRrNHfesBYfpRmBCcHLs23GEpKnGgqdKMvS/NRbSpZaoWqkg7f7eA6maCER5Yc0ODSbuYp0+bFvLqFqUnvLQw9yGFPZS85KhM8tSox9upacocgX9ovoRfdmSFzh47QeFO0UjWdqMvIqw5N2C0MinDxQRACzi+a5ALxPJg1Yfk/LM/GOZKWUzWY1GdP/URou3uyWtKHrQ9PkAKcuNP5UL7/CK4ZBDKG45sZ8I74oXHKeEK1GPZ8SrlZ7ovGRzVGIt1uNZNxiA== 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 Fri, Jun 13, 2025 at 07:53:37PM +0530, Dev Jain wrote: > > On 13/06/25 7:49 pm, Uladzislau Rezki wrote: > > Hello, Dev! > > > > > On 17/04/25 9:42 pm, 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(-) > > > > > > > > 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) > > > Hi Uladzislau, > > > > > > Post this patch I am seeing the following problem: while booting the kernel, this test is > > > executed and a particular testcase triggers a warning splat from the kernel, then the boot > > > gets stuck for 3-4 seconds, then proceeds. I am not an expert on modules so I don't know > > > what happened but I am guessing that when the test fails, the delay is due to module > > > unloading time...do you suggest a solution? I reverted your patch and then proceeded with > > > my work, so apologies for not having the dmesg log, if you need it I'll replicate, although > > > there is some subtest which has consistently been spitting out a warning on my Apple M3 Linux > > > VM and I have been just ignoring it for long : ) > > > > > This is because CONFIG_TEST_VMALLOC=y is built-in in your case. > > Actually, I have a usecase for test_vmalloc :) I wanted to test my > patches through the test, but the problem is that the moment it fails, > it gets unloaded and then I cannot use the test at runtime. Currently it > is set to =m in my .config. > Ah. It is unloaded itself when tests are done. Do not use the test_vmalloc.ko directly. Instead use test_vmalloc.sh script. It is located here: ./tools/testing/selftests/mm/test_vmalloc.sh Example: sudo ./test_vmalloc.sh nr_threads=HOW-MANY-CPU-YOU-have(digit) run_test_mask=7 -- Uladzislau Rezki