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 D9777C4725D for ; Mon, 22 Jan 2024 10:00:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6DE9C8D0002; Mon, 22 Jan 2024 05:00:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6668A8D0001; Mon, 22 Jan 2024 05:00:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 507188D0002; Mon, 22 Jan 2024 05:00:02 -0500 (EST) 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 3805D8D0001 for ; Mon, 22 Jan 2024 05:00:02 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id CBD241608F1 for ; Mon, 22 Jan 2024 10:00:01 +0000 (UTC) X-FDA: 81706501002.08.CB7BE95 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf19.hostedemail.com (Postfix) with ESMTP id B330A1A0013 for ; Mon, 22 Jan 2024 09:59:59 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf19.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1705917600; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xnMxnrLbZsYOV7/i628ZpTm6dAUsjY8ROmRWiIaRNYI=; b=7oMDufHTJNZKds4baaTpm/ontnoV0XxrSa1kqUzvETgym38r/VRGMo0YD/jNFUWggzTHFm l8eOYLkbexWysYbANo63H2Z4AbMt6g6b/Fm8J+hMZc8Or8cE0AN9+JmUT+vwxq0b6neGJc 4g3Yx9JkfYNsFRTq1AEZm0U6wf5t2lE= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf19.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1705917600; a=rsa-sha256; cv=none; b=tLeZb3f8LDGzCU+le9oJAqBuYUzvEzQ8R8ImT75nyS0XBphP2Epe9dWHCay4LTkJuf9FUG b3Z9XIFV4YQCFdawmXRFiMKJ+ianOA1KsuYRNEwcUOQfwnTbwlZ1v7EgVeXtLuiU9dqPQE 5slso5R4tZ/nsXmlvnWZtbJpXAgcrLc= Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 762DDDA7; Mon, 22 Jan 2024 02:00:44 -0800 (PST) Received: from [10.1.33.151] (XHFQ2J9959.cambridge.arm.com [10.1.33.151]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 95F453F5A1; Mon, 22 Jan 2024 01:59:57 -0800 (PST) Message-ID: <06d796a1-1ae2-4f97-8fd6-0e3529ae2799@arm.com> Date: Mon, 22 Jan 2024 09:59:56 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] selftests/mm: run_vmtests.sh: add missing tests To: Muhammad Usama Anjum , Andrew Morton , Shuah Khan Cc: kernel@collabora.com, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240116090641.3411660-1-usama.anjum@collabora.com> Content-Language: en-GB From: Ryan Roberts In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: B330A1A0013 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: mjjhofri8pziocb4ofjximigu9w3cf4e X-HE-Tag: 1705917599-510293 X-HE-Meta: U2FsdGVkX182Uj/X3EUT+I6b5bGppv2AjujICC6BTk2I6XGOvbQcRuPv5BrjZi9FeCUn3M4DZJ7RsZm5Ooxr2Dn6ypcTdCrP98RcYmQFy1fJPsXr4fADYl4UiMBmlUMypRBk/FGqgPbl2oJAA0tC+wlXrjrrZ3bau1fN2o8jXictLtGZnCHC/SQBnBKyROuE/jHuuFMqAgNH2f1nrKf50jSyFzZeg3EUf4I9zI3KGyAqD7n5uajbex8ZVyIz6GjRI3/DCs37ilUKDI1ITBXOASRbKB1EyGEk4Oo+pYFyZg2T+aFv7yTRA3aU5pX8AGjf0SBfUnENBnxNZMbWGsgVsgB6mQHHMQCVAFhy6eCnREIz2Zfx1WmnuQLOkGIFVOG18f5MlGNDLgOtVwL75qvPY/gOxQ5mXxF2WXDB3WqZTe5s/tpycrelRmzOATSMlrUqxGci4n0hqPfs2434nDr9jMbuOvBrcQ8LTt0MiOUsa1k1tYRR3yhZzXWoAMwNsSbRH4kcNP8ImFRkw+jN2aMv7VN/6q1ViJ5LHBdaLKJkINqOenmEA2pWPcBuDtdmooArc4h/j9d4ghm4XhaDNU5gRtSaivrXDrFA7JxyZQ3xQuBEbfd4Qe4r84oSFfvPVGIOSpA10BcfxRjmPCWhkru2f2xzoKWlDg9K2ICjEbvEsHEydKerXZj6JqfV0H0DGtVTRzTOmBGMv3948kPMG/rovQN0Y0Do3EsVr27+Wd8ldacV+9L82TsAJnU1SFEJj7Q3MNFHXfoC9x2Io9oikwBTiOfSnPdFYayBeclVO1lbfD2xHvVGYv0zG+TeZ2DoydLDDtkshQPCj11KnpipHnMjsmrDmhqCNUzSWH0OdiM6qkKMPG4T622KdN5CyjdnkGxOp0p8cVl+4npnyQhGZEeDMQN3stTeahaS43WKRLhOVG98lKk22ko/HqAy+sL19PpyLKl5GYfyYTYiAbP2RcY tn/zN6Os 4dB/t8yGTQAhmtdGBjcDGciPTlkew2ckXbODXVIUQc9Cbuk5q0tkjKACRAP5+h0gvuOOW2/uL5y/hh0O0J0sridlEMCt+SIcZueR5k1ZE7iyxnsTpnjRpSMXjLsqeO52vUg4lDbdV1HDF++vey/m7tVn822V/xBw7NvJBshUsul6qZ1m/GUBsyrTmfmFZaI9HE05JKnIXZug73uhKDwPGtH4divZkFf/DE2aX2/QjBwLPHY9kYZIRPS6xbPJfR2JB5M9fGFyqGzdiXTDhi9gc8Elp40dMq92R+VEaeeg11Qt/azdea//rsXWTfw== 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 22/01/2024 08:46, Muhammad Usama Anjum wrote: > On 1/19/24 9:09 PM, Ryan Roberts wrote: >> Hi Muhammad, >> >> Afraid this patch is causing a regression on our CI system when it turned up in >> linux-next today. Additionally, 2 of thetests you have added are failing because >> the scripts are not exported correctly... > Andrew has dropped this patch for now. > >> >> On 16/01/2024 09:06, Muhammad Usama Anjum wrote: >>> Add missing tests to run_vmtests.sh. The mm kselftests are run through >>> run_vmtests.sh. If a test isn't present in this script, it'll not run >>> with run_tests or `make -C tools/testing/selftests/mm run_tests`. >>> >>> Signed-off-by: Muhammad Usama Anjum >>> --- >>> tools/testing/selftests/mm/run_vmtests.sh | 3 +++ >>> 1 file changed, 3 insertions(+) >>> >>> diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh >>> index 246d53a5d7f2..a5e6ba8d3579 100755 >>> --- a/tools/testing/selftests/mm/run_vmtests.sh >>> +++ b/tools/testing/selftests/mm/run_vmtests.sh >>> @@ -248,6 +248,9 @@ CATEGORY="hugetlb" run_test ./map_hugetlb >>> CATEGORY="hugetlb" run_test ./hugepage-mremap >>> CATEGORY="hugetlb" run_test ./hugepage-vmemmap >>> CATEGORY="hugetlb" run_test ./hugetlb-madvise >>> +CATEGORY="hugetlb" run_test ./charge_reserved_hugetlb.sh >>> +CATEGORY="hugetlb" run_test ./hugetlb_reparenting_test.sh >> >> These 2 tests are failing because the test scripts are not exported. You will >> need to add them to the TEST_FILES variable in the Makefile. > This must be done. I'll investigate even after adding them if these scripts > are robust enough to pass. Great thanks! > >> >>> +CATEGORY="hugetlb" run_test ./hugetlb-read-hwpoison >> >> The addition of this test causes 2 later tests to fail with ENOMEM. I suspect >> its a side-effect of marking the hugetlbs as hwpoisoned? (just a guess based on >> the test name!). Once a page is marked poisoned, is there a way to un-poison it? >> If not, I suspect that's why it wasn't part of the standard test script in the >> first place. > hugetlb-read-hwpoison failed as probably the fix in the kernel for the test > hasn't been merged in the kernel. The other tests (uffd-stress) aren't > failing on my end and on CI [1][2] To be clear, hugetlb-read-hwpoison isn't failing for me, its just causing the subsequent tests uffd-stress tests to fail. Both of those subsequent tests are allocating hugetlbs so my guess is that since this test is marking some hugetlbs as poisoned, there are no longer enough for the subsequent tests. > > [1] https://lava.collabora.dev/scheduler/job/12577207#L3677 > [2] https://lava.collabora.dev/scheduler/job/12577229#L4027 > > Maybe its configurations issue which is exposed now. Not sure. Maybe > hugetlb-read-hwpoison is changing some configuration and not restoring it. Well yes - its marking some hugetlb pages as HWPOISONED. > Maybe your system has less number of hugetlb pages. YEs probably; What is hugetlb-read-hwpoison's requirement for size and number of hugetlb pages? the run_vmtests.sh script allocates the required number of default-sized hugetlb pages before running any tests (I guess this value should be increased for hugetlb-read-hwpoison's requirements?). Additionally, our CI preallocates non-default sizes from the kernel command line at boot. Happy to increase these if you can tell me what the new requirement is: hugepagesz=1G hugepages=0:2,1:2 hugepagesz=32M hugepages=0:2,1:2 default_hugepagesz=2M hugepages=0:64,1:64 hugepagesz=64K hugepages=0:2,1:2 Thanks, Ryan > >> >> These are the tests that start failing: >> >> # # ------------------------------------ >> # # running ./uffd-stress hugetlb 128 32 >> # # ------------------------------------ >> # # nr_pages: 64, nr_pages_per_cpu: 8 >> # # ERROR: context init failed (errno=12, @uffd-stress.c:254) >> # # [FAIL] >> # not ok 18 uffd-stress hugetlb 128 32 # exit=1 >> # # -------------------------------------------- >> # # running ./uffd-stress hugetlb-private 128 32 >> # # -------------------------------------------- >> # # nr_pages: 64, nr_pages_per_cpu: 8 >> # # bounces: 31, mode: rnd racing ver poll, ERROR: UFFDIO_COPY error: -12ERROR: >> UFFDIO_COPY error: -12 (errno=12, @uffd-common.c:614) >> # # (errno=12, @uffd-common.c:614) >> # # [FAIL] >> >> Quickest way to repo is: >> >> $ sudo ./run_vmtests.sh -t "userfaultfd hugetlb" >> >> Thanks, >> Ryan >> >> >>> >>> nr_hugepages_tmp=$(cat /proc/sys/vm/nr_hugepages) >>> # For this test, we need one and just one huge page >> >> >