From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (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 1F83F399017; Thu, 21 May 2026 06:48:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779346136; cv=none; b=e2KXePDyZw3C4l5H2owsv2erc43en65f/no/UlJJrCXHiaa0kWI264DgnChSidb1qkG499x0TTszP4GOt+4Ul19Xlt+JZPfUCryQsX6fZ5v1koGSfDQxEub/4bOQ9rnS6GoMsU60Rm6rT61xFV9T0WjSksWvdAE1R8+991bmvRI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779346136; c=relaxed/simple; bh=kxV8+1kwk5iTCGncuidvU0c/O6/K7qcPLyYRJgPBhSU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dneZqN3vvr+FoMgjx+fTlVHizVEYm7/B0NpdHV8ISLVerqRR8cAx3+zSx/cXw8qBCsv6WVOPbnLZTVVZ06kBLf4RMwkwttd/wVpyia1mz/0s7c8r5aud8sI4QxgoInallWmGSZpiQEG9QyyVcfiqlD95tEnuFeRLSmZVJ5YdYk8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=Mlxj7w+d; arc=none smtp.client-ip=148.163.158.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="Mlxj7w+d" Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64KL6B651853987; Thu, 21 May 2026 06:48:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=FQF9FZs2eg1Enek9q TboZeMmaUyOa6cHAXzM+prlfBI=; b=Mlxj7w+dI6BPwWKLt9DobguPgTezmwtgq 6IYVol4dfvkvBY/EnYfZVcQnZoCpyJJh+WF373/4/gMEqetOPEpiHc5hp8OUhoi7 CvwqhzfF8v5d81LD2RR1ExLLR38RZ7OaCQ6RiSEaywenuJ51ydA/+2cK97oK+cVh jrNs0RiSnxshveuwYP0ZuYMu9XBIy021BB/rKUGR284frDtaxHE+aM5C8KCJ6xw7 88BmtBqHxXTR1ZEwVbxe6Y7d7QIAHuvpwQmlQVEcYhLjLQiyg8towhyWQVPBH4mh mRQJc98aorhoOtuKIhRPkTNQ/JdrhasJww06oou8PYafrcBo5Fwug== Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4e6hb8mbp4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 May 2026 06:48:33 +0000 (GMT) Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.18.1.7/8.18.1.7) with ESMTP id 64L6dIbu018383; Thu, 21 May 2026 06:48:32 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 4e75kyajev-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 May 2026 06:48:32 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (smtpav01.fra02v.mail.ibm.com [10.20.54.100]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 64L6mSAK24248782 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 May 2026 06:48:28 GMT Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BC0E420043; Thu, 21 May 2026 06:48:28 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9D64520040; Thu, 21 May 2026 06:48:25 +0000 (GMT) Received: from li-3f69264c-2ce6-11b2-a85c-c3f414d24014.bl1-in.ibm.com (unknown [9.123.3.209]) by smtpav01.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 21 May 2026 06:48:25 +0000 (GMT) From: Sayali Patil To: Andrew Morton , Shuah Khan , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Ritesh Harjani Cc: David Hildenbrand , Zi Yan , Michal Hocko , Oscar Salvador , Lorenzo Stoakes , Dev Jain , Liam.Howlett@oracle.com, linuxppc-dev@lists.ozlabs.org, Miaohe Lin , Venkat Rao Bagalkote , Sayali Patil Subject: [PATCH v7 11/13] selftests/mm: skip uffd-stress test when nr_pages_per_cpu is zero Date: Thu, 21 May 2026 12:17:51 +0530 Message-ID: <0707e9a0f1b3dd904c4a069b91db317f9c160faa.1779296493.git.sayalip@linux.ibm.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Reinject: loops=2 maxloops=12 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTIxMDA2MiBTYWx0ZWRfX5T9MuEj6il3V UJOg1gPjYjwcVi+pLoVBKsSGrOjMDf2eR0Ci18QiQ0WDrYrrN1MYpNRfvffO502mEKxKRhj8MEB W1H7oKAVeW+X83PL+8oIcFDLRguerUwu/uSVHEsQEyURYsj+q3jv8oFRU2vgqxTDGbbOIAAMwLu Gg0MfFUeeufQ150M36iL4soXznGKJIuVLlTBzJiPmU7v/1KCoCCllgtqTRADt+Qr0blKBT7OO7F mcf47vY7cTeyYheZ6yj7Z9XDvliIrZ7hZJAt5JscB6RDeB7sCnnrcj38qFrs6LSC92re1R2lRiJ mrgYdqMnQI/qOYJa5Jnnufj85WZW3hKMS21PJw22zrayE2n44trERaKpqbJzS9HDt+WnkDwQnSY ZIvM67sU8/Tg0M+XCJtClwKckQ1AX0q78YL72RiIdhwNFnQKI5XaHT7EJMVo0R6z9DY69N8IP5M Pt3rLFxcdU5lOtAuUjQ== X-Proofpoint-GUID: Z1xE03N4YSu0Q5Q9srAd_BPqDsz20iYe X-Proofpoint-ORIG-GUID: 9jLyuVdzYQWkAs55cBOCg5EFOmwt-_YL X-Authority-Analysis: v=2.4 cv=aYBRWxot c=1 sm=1 tr=0 ts=6a0eaac1 cx=c_pps a=aDMHemPKRhS1OARIsFnwRA==:117 a=aDMHemPKRhS1OARIsFnwRA==:17 a=NGcC8JguVDcA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=Y2IxJ9c9Rs8Kov3niI8_:22 a=Ikd4Dj_1AAAA:8 a=VwQbUJbxAAAA:8 a=VnNF1IyMAAAA:8 a=QLFraA1qSxkZgXf6QZAA:9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-20_03,2026-05-18_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 adultscore=0 bulkscore=0 suspectscore=0 lowpriorityscore=0 clxscore=1015 spamscore=0 phishscore=0 priorityscore=1501 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605210062 uffd-stress currently fails when the computed nr_pages_per_cpu evaluates to zero: nr_pages_per_cpu = bytes / page_size / nr_parallel This can occur on systems with large hugepage sizes (e.g. 1GB) and a high number of CPUs, where the total allocated memory is sufficient overall but not enough to provide at least one page per cpu. In such cases, the failure is due to insufficient test resources rather than incorrect kernel behaviour. Update the test to treat this condition as a test skip instead of reporting an error. Fixes: db0f1c138f18 ("selftests/mm: print some details when uffd-stress gets bad params") Acked-by: Zi Yan Acked-by: David Hildenbrand (Arm) Tested-by: Venkat Rao Bagalkote Signed-off-by: Sayali Patil --- tools/testing/selftests/mm/uffd-stress.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/mm/uffd-stress.c b/tools/testing/selftests/mm/uffd-stress.c index 43cc79590136..39e13e2078a9 100644 --- a/tools/testing/selftests/mm/uffd-stress.c +++ b/tools/testing/selftests/mm/uffd-stress.c @@ -489,9 +489,9 @@ int main(int argc, char **argv) gopts->nr_pages_per_cpu = bytes / gopts->page_size / gopts->nr_parallel; if (!gopts->nr_pages_per_cpu) { - _err("pages_per_cpu = 0, cannot test (%lu / %lu / %lu)", - bytes, gopts->page_size, gopts->nr_parallel); - usage(); + ksft_print_msg("pages_per_cpu = 0, cannot test (%zu / %lu / %lu)\n", + bytes, gopts->page_size, gopts->nr_parallel); + return KSFT_SKIP; } bounces = atoi(argv[3]); -- 2.52.0