From patchwork Wed Jun 26 16:06:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liam R. Howlett" X-Patchwork-Id: 13713160 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 F33ABC30658 for ; Wed, 26 Jun 2024 16:06:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 32FBF6B008A; Wed, 26 Jun 2024 12:06:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3069D6B0092; Wed, 26 Jun 2024 12:06:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EFA5F6B0095; Wed, 26 Jun 2024 12:06:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id CBEB46B008A for ; Wed, 26 Jun 2024 12:06:47 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 52800A1434 for ; Wed, 26 Jun 2024 16:06:47 +0000 (UTC) X-FDA: 82273518054.01.F3146F4 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf19.hostedemail.com (Postfix) with ESMTP id 273551A0025 for ; Wed, 26 Jun 2024 16:06:43 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=fpsS1Rak; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=nnKJ585k; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf19.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1719417989; 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: references:dkim-signature; bh=ectDZcZBz082gt4aoE3SA5jU5Dbmmj7TtKzM2HttSck=; b=Z/U2axu4LUNlOGG6419t1qdwAaKB9D3yGB1f92dsRPMmUmKjjLh7SwVu38tCsQ/hq04Bvw oDQG6u7FhxQCzTbmdYJSRsuR7NgCfptq8E2XEexpgR+3y9+AQrjUkKjAfgvboVJyAquTUF ru3FwBav9aRGYVAzCEQonaDcigJZ720= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1719417989; a=rsa-sha256; cv=pass; b=f3DaBu/Db6aqq3JY4yco50b0NLdbXdiBx9VCXUuJeNHXDYtw+Mur+wUw5M2jYu3jYYX8xx 5Nagndx77DD+LF1sjBzoJOARb0mm+pvt4RWEWLTn7tomc2u5PG9zHB3zKkgmTsh3AEPHxK iGLX16RePCdAB31MVpZ5qLqvz3Alofg= ARC-Authentication-Results: i=2; imf19.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=fpsS1Rak; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=nnKJ585k; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf19.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45QEtWUt026697; Wed, 26 Jun 2024 16:06:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:content-transfer-encoding :content-type:mime-version; s=corp-2023-11-20; bh=ectDZcZBz082gt 4aoE3SA5jU5Dbmmj7TtKzM2HttSck=; b=fpsS1RakfIqAXWkyzlkgB6bM4C9MPT POP3S35NOlAJnxqtwQCQCiXnaelb4plzrOHZSHmXDzQUhXHABTqqN2VNn3vu1B5w Ze24N/ksFNWHUlTdayEH8+WXOwe6FcYswZVVck/7UIeElE46VdREKYDf41HSvUSA 7nBENn8ybauxU0GNN8uGVnnR1LBMU3KEuTql0GfzljgV7ouu4y12GgNdBRk+F+cL oiSBvOQ2lsPbRBOYizffIseyKOeS6+SSGNTAwE/vx8uZSiJLKwSKyQtwlvWl7YLJ 5EqGRPOKISHDBwsZoQYd1OlcgNjrkiCYqsB2jVd8H6X4Mmj+KYqjvCiA== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ywn1d3hb2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 26 Jun 2024 16:06:42 +0000 (GMT) Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 45QFlvKP010721; Wed, 26 Jun 2024 16:06:40 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2100.outbound.protection.outlook.com [104.47.58.100]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ywn2fr8my-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 26 Jun 2024 16:06:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S/UhJjif2Cpe9l/lxnsVLkh+AuTN5D+tiloIrZK7ahc5Rj9ftna7YQbMTgODL5LJ9s8ug4HxynuA4e2m70zRTXD0MEjRYr4Hd5hXLjsBzSMguC/SJtbzW7EVeXlj/6Yfe8r2Aa4Np2c4EjjzRPcl82ADBi9kZOW+54WpC3VbOeuaoEt6+0LUKCG43L4KNN265YHfbM4b4UeunwzDtp/Kwv8bBK44slqLTRvjqTvFOsNtQRet7spT81q59pj5n154NI1wnUNwrQgzKMXg+3iyYK42MXz5/MXO7NYfzbtwIu/9RAqlc9WJmGIxnBpfV7mbhXOfhJ1ECEaCzNAs9Hqi1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ectDZcZBz082gt4aoE3SA5jU5Dbmmj7TtKzM2HttSck=; b=Seq6UWxQLIJJucebPxeRopxsL4Lj3rMD+VLxLdlmoHZrwqc08d1bnC4L+q6Xbb2VLfC258wujasse8NqCRy3ByazmI1Hr6aAnw2JuLJit8XGjF5hisU03n6Kuv7Qr8YaZzV5aw0YpuAtIAT+iLDQSUOwz98ZniaJS21AVJc76lPYH09B/D9be6oDzWJIyQ2OfkaiBwnJSxQ+CkUBtCzJF3246CYjIKTkMMXe7Yx0g9hQxY15dhYvBBRTwGsSl1UepjaNrk6YwIFtzkYLQRA+/Ss6SyNwSiiGc7C0tOcXC+x5Ew6syUoQEFfU7SY4ASubDlQZP9mbea0zTlnI61BI5g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ectDZcZBz082gt4aoE3SA5jU5Dbmmj7TtKzM2HttSck=; b=nnKJ585kjoCS6BrskY3pCCBi2SuB8WiJbvg6rZ0yJf43iY9dDpaEl9bPotR/hdBV1XwNOreBBTstiaVc8lCG4sC7NtPGetl/c5C98iEhe0pG+UPF5znNqc1zYYeNaQNj+l1t2R+QFkZy+THuAls0CwJrKGbGGBtxjkNt3ZfrocQ= Received: from DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) by DS7PR10MB7225.namprd10.prod.outlook.com (2603:10b6:8:ea::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.30; Wed, 26 Jun 2024 16:06:36 +0000 Received: from DS0PR10MB7933.namprd10.prod.outlook.com ([fe80::2561:85b0:ae8f:9490]) by DS0PR10MB7933.namprd10.prod.outlook.com ([fe80::2561:85b0:ae8f:9490%4]) with mapi id 15.20.7698.032; Wed, 26 Jun 2024 16:06:36 +0000 From: "Liam R. Howlett" To: linux-mm@kvack.org, Andrew Morton Cc: Jiazi Li , linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org, "Liam R . Howlett" Subject: [PATCH 1/2] maple_tree: fix alloc node fail issue Date: Wed, 26 Jun 2024 12:06:30 -0400 Message-ID: <20240626160631.3636515-1-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.43.0 X-ClientProxiedBy: YT4PR01CA0084.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:ff::9) To DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR10MB7933:EE_|DS7PR10MB7225:EE_ X-MS-Office365-Filtering-Correlation-Id: b91b0498-7b54-4a23-c4a5-08dc95f9f449 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230038|366014|376012|1800799022; X-Microsoft-Antispam-Message-Info: qOyt/9rzIejFSpNKShgdbgSbJ3sie95u+1Qc9X4z3bycvgh/Y5X4T//4FXdHLsdC4RkGzTlZHqTnBthJYj/aFB2XXYiiM+ZIrmusZfarZENtuO+Lj82H1AlUdr2yJwFopeg/JXRAwf9FYROfmS/897BhPKW/daNPVmRsQqzlx7rPFZ/eb9UiNxcXc64ZP5P9I635NKBnxipCn7b/z2PbtjlZn0TKQXumWgSY9sNXs8J26NSOJy7uYtcto7OJmLODUDiAtmsPUChJ0a6nOkKVDZRk6Zri2yB6VRjQwxX6/kRHhEH1oT1eLJllUGIvWZ+Wx+HhChDhZ7G78Z7aIVafYcTHX5Ajykr+kztIp10jjI+U1G1xo86lqDjlgllSc260CY8GTTx+QtDsgDkud1dBTRRFUJ5yfStYT909EljR8eGcoi+tYVlsi/NY1rtGjeP+e67jINgld9Rj2SIkQRfgjl/fVYtD7HK4fjwZljBDJu9z8FZjr+PmFfJkQzwQk69HxFK3K+AHbVN5ytqaUU4yWGzxt2r5JUJa2/IlMHs7+QlPYy/NCUez3Y1n0JieBDsouwUOFd/m7eGjx/mPJQDa8t2taxoEFtC2rN0YUdzf/j3Ha6kYW0qUPed61c86UE7NnsFyNtvYZMmBYi70WHeIHscFqgfCpxdrshoLGNhfyQiuA9DJ5sOmuYGtAV6twRCGX+Rn+VZFun+utSNP9giy5bh6BJMxfUC4oz7dbNuB4xUDb3GCQ876ZvD6Sy59SOhr+9baKNzwTq0QBUQbv2CTkWZd5/LTupzdzlJGJ1lFGOw6ToOD2UVSq7VwcWVSZzB7TcrJf/ywkb/fx4NQK08DrY9tKQXkeZHzLg1g2V5dIxpH9v4WThkwqdme8umQNMrlQkvIw2rYHGQ0Z4sekA0X35SHZgkAfVcO7H7s5Tx1X0ltMzEVVMN7tDqy7UTGtv+f3D9ATL1aVUiBOdTAbIa6PraoH7201tI8PunAjYYWoll/EVCsFY+g2ZKmkByA+Z8MYoujCpBZGP/A1qPy/0qeXS1wXl9+Ngq9FKor8tOboVNtlRrzcipVh1JmGi5EYH3lJ4R2AB/NGczc8DL/PVKyEIe+6zTs33HEc3L0aqDCwmz5kwJovaY8VLAUD54yHo0dY2x4rWv0hTBuq/Y0VAt0wQPoHGdPBmgfxF1FO5A6BN6WbyQiIQJkijIffTY8c4YBu6L/McNV2mBZ4vltsZp9K86LcAhzc3NOuder0/+qrO4fAdgM+GzAe+GbjS0GLWhecqoXHGttHJU48ghN8RQ/DX+iazYJtbohppAC7XTak/4In+wF873xm4m5tHzYOa+7cfEr2pRv1+layVetccSpLA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR10MB7933.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230038)(366014)(376012)(1800799022);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: iiH/MV0ZJwG4OeMDCqi2YdPN117MsV72SimaQBH5eGKGv9JCvHobr045e/ZOaN5SAyqViLl4oCiIJa2fpUEtoW/fnrYvdi8+F69/U+LNcLXGwPUVssCqZ+nPfsJ+bR3p2ehUg1j7VdV1UAqcckp6fqo1SbdFXbrD7yM2kLS3rZAgyN9aEcK+sS7icpRtRdVzEtR1XP6ynJT6lvCAXhO+RNAPGKLaPMFWo5eWrDLKJb6CyFZp/tUeJ5ksQdGWurNNo3BKEWRz3tAN270LcOExrL7wkpvQGw1HoFSZWj89rDKgGk30Ek3NfXe5GbQKgjzsZSu24GYkk1snt90vSIAoBnJDoIXepGuqDSVsqOCg3b3ABOr1owB7vQsMKbftY7u2t41D1L0UO/Jzn0gMmKtyPYB2Bg3ZhS++Qlqgnd0Fm8sWwdmLVelh2PO3sGv3Hmtcym+tzrNQVP04cZjfwWTsrkMRXP8OI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hKoTObhg4qw7T3nOnFAHAqnBElQ66EZpMT8oBiHEn5y7FLz8SGeqR6GnwsIA== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: QUrHudMBR4ScNzdRX82DpKh/uYtUSwS3TstZ17/UZ7Sdsegf5yKWJ2D5ZFx3SFT0Iwhf4yENYFcegUlCYWfsHjC/gvRSDTOywt31OWI10ZI/42gqztPEYfBQi5v6cPxj1Ml9pChE4w9KtU+MFW8ONO8pdchFs4ohX/CPvJqjSuW6AQrs7OhFB05aLfeUKTb9lnCjrVxJT9QwiA3bZuimZBfqRN9wU5HKIYxWguzkCnW5E8wXGSKT0SSWknpodWmUsL0daR37DHx9Yhc+ub9wlSgZhqKr40emNT0zV410p5hFKqIlbVz4DaGhpDLUkXZE1qbnskiJU3hVO2ZI0iQmtm7H8dGDY23jBnTjFje3dTOxvhXRefGj7OUT/s5i/+KgrIXG0/16hf/nkKBQIU+FcBnT1MwyGPp4D1AS/tvyMUq25B73xLco1jKE/xHCFuSCeFsCt5zsG/R4crl8F0ECnAlm/0UYGjI21IXlvavARrCKiroPPAMzA6k4hRUJBUKEAz8ovvo5fjd28/hq0H0k/nOl/VQGg/3C9QUoYzrL1uxv1MLeZgONbcSB9JOrHYdzFxNMP4W8IC1fS3rK6ZO01W0KCq6tqHjGfPPFkU/z8Jo= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b91b0498-7b54-4a23-c4a5-08dc95f9f449 X-MS-Exchange-CrossTenant-AuthSource: DS0PR10MB7933.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2024 16:06:35.9355 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xy/4SFwSUHdplBs9bHscrL/KRK6P7xABTtJ47+T/8fc6s/e8jNFgeXSG0oJJaGp6fesrF01qO3v9OobT2GGucA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR10MB7225 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-26_07,2024-06-25_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 malwarescore=0 spamscore=0 suspectscore=0 adultscore=0 phishscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2406180000 definitions=main-2406260118 X-Proofpoint-GUID: AjrVpalinlCQg44D7Y7FupoTixuJ6kFh X-Proofpoint-ORIG-GUID: AjrVpalinlCQg44D7Y7FupoTixuJ6kFh X-Rspamd-Queue-Id: 273551A0025 X-Stat-Signature: jpftbzzys1k865r8i6zqrfkoksqamjij X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1719418003-619772 X-HE-Meta: U2FsdGVkX19GZPO+gU9HbCOidfnLTRV9sgQ2+dJCNlgHe5mXCkzOLCjip1tNhFPwLgfZbs48N1CH07Nf/EQaEor8k85HUZPPck23XGtidHioI+tMmh35yRoKP8iRfaPmjGbn2PGV3j91tekfV80zcgQSkeQBC/cGoA2j222rRJbT9Bx00rOP6adM0+ZOC5hW3jGb0hPGa9n7fUxzTnHcx0BnCovukhhwZTWAlySENDMJ5JYioBEA02/aOxanhGtSiqCk6+CHPZQt7HMPEJck3hu5nlOE8E25y1a0KVLzBByBirZH6dETEiI0oIfONs1LiN2NYM6DaMlgB2g9VhSqR80jQEEQVTlYoK2hjRKfoNPAjoxIreYgVW4mMY0bFrI4uffnFkizgPMuy/4c18oEbd7Ca8cJFb89Itr9iuoutNDSDGa5eeVayAS3JdNZ7M8nGe29subm1zhqWtK4J586lbBmm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: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: From: Jiazi Li In the following code, the second call to the mas_node_count will return -ENOMEM: mas_node_count(mas, MAPLE_ALLOC_SLOTS + 1); mas_node_count(mas, MAPLE_ALLOC_SLOTS * 2 + 2); This is because there may be some full maple_alloc node in current maple state. Use full maple_alloc node will make max_req equal to 0. And it leads to mt_alloc_bulk return 0. As a result, mas_node_count set mas.node to MA_ERROR(-ENOMEM). Find a non-full maple_alloc node, and if necessary, use this non-full node in the next while loop. Fixes: 54a611b60590 ("Maple Tree: add new data structure") Suggested-by: Liam R. Howlett Signed-off-by: Jiazi Li Signed-off-by: Liam R. Howlett Reviewed-by: Wei Yang --- lib/maple_tree.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 634d49e39a02..fe5c6fab26c3 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -1272,7 +1272,10 @@ static inline void mas_alloc_nodes(struct ma_state *mas, gfp_t gfp) node->node_count += count; allocated += count; - node = node->slot[0]; + /* find a non-full node*/ + do { + node = node->slot[0]; + } while (unlikely(node->node_count == MAPLE_ALLOC_SLOTS)); requested -= count; } mas->alloc->total = allocated; From patchwork Wed Jun 26 16:06:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liam R. Howlett" X-Patchwork-Id: 13713159 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 7435EC27C4F for ; Wed, 26 Jun 2024 16:06:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E7B8E6B008C; Wed, 26 Jun 2024 12:06:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E01E76B0093; Wed, 26 Jun 2024 12:06:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C2D806B0092; Wed, 26 Jun 2024 12:06:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id A25F06B008A for ; Wed, 26 Jun 2024 12:06:47 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 542A6121494 for ; Wed, 26 Jun 2024 16:06:47 +0000 (UTC) X-FDA: 82273518054.05.94A0F11 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf15.hostedemail.com (Postfix) with ESMTP id 0AAB3A0027 for ; Wed, 26 Jun 2024 16:06:43 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=cPaeS9FU; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=IaeOYPFL; spf=pass (imf15.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1719417995; a=rsa-sha256; cv=pass; b=DhpoLVoPZoEK0i8uXUlDW5K6ckYa6oiIMcQceggwn2tAnkYnXuUOv/tgWXNnz0dLU9/k8+ SFtF8PBIrCWPgIGGHjZ+fFQO6I5+rI7Yj0AUBkI3cSWrGZMrecDVR96RfAmgTA3KAWD6p5 v4Ssn0d2REk1spqUJVu2oTglNepaKww= ARC-Authentication-Results: i=2; imf15.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=cPaeS9FU; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=IaeOYPFL; spf=pass (imf15.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1719417995; 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:dkim-signature; bh=gM6p7keAHnECOjt+PKvFW0zRiB40kIEnG7o+UPDsALw=; b=vW9EzhAIO1nX2w/SHdrkpoFTBzTS7mUZVBrO5VGLSGE+sjWHi9ePVFYGkLDpnKEOHRyg5r t7VDpNdSw0zwWbVG3WCtSWvM432T+SY26wX3nw9SjSPLybdBEsLBpDNeObOx/1QM5sU/rT vNZntx+drABASOHyLUh2Z1KeJzEaVf0= Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45QEtV7V010974; Wed, 26 Jun 2024 16:06:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= corp-2023-11-20; bh=gM6p7keAHnECOjt+PKvFW0zRiB40kIEnG7o+UPDsALw=; b= cPaeS9FUI9ESi5RHpyQRtpa1hlU3Dx3eTKbYzLcFA+qxZZ/uaK+pSsmvlcZ9z/9t r1NE0ZZgC5pCKek4NLtCrd230iBC4McnHBD63dB0t/xjbVC3z+GivQdUK73bYGO4 RFZ6Nzi+u5rwDpbtIN58loT7p5ejdi4zxLIBF0P4KRm/6+LpgOBC1Tr1aUvmKMZM khfsFlHnf6wPdWvxWrPi819rvNdR3cQOUYFJs1MMQSyW7jfL6VlUvE9Y8bL25CnV UnWKvbNJ7BEULWLUspwuu+JGU6XFR4j5iNhI4YIKfE4wVfYDNEHTxtwfzhaf511t VS0v0AOrnRtultHIP1cTyg== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ywpncc0wd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 26 Jun 2024 16:06:42 +0000 (GMT) Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 45QFlvKQ010721; Wed, 26 Jun 2024 16:06:41 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2100.outbound.protection.outlook.com [104.47.58.100]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ywn2fr8my-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 26 Jun 2024 16:06:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T+OBVLwMNGUyrSiMvlUW7ts/AMMPZRIwvwrNR2hcq1w8c4af4PMFAUMRvnb8wXukbcYcDZujC8dBgk37OXHCaBMvmkK/w+1BbSAngOErdhhHkLo3ODCZfza21auqjiAmDlxhV6Ev7RXMRZR9um1GMBWbiav5AUb3IgTGzyctiWb1CeXDUmoYJHYoUKjrl7w5hFZm1J5cktz49BgJkSqLrHVoFkAbXZZ+66/tIzpfLjAopde5bI8JQfy5eQl9Io6EmYEeWaMbeh6uIzh9Ri2GHuy0h5NjQbtrAAgWQCGvFl16QaLv9b8kLF/f04/xYP4TkQAvoFeJLsB/IB4YVQNEjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gM6p7keAHnECOjt+PKvFW0zRiB40kIEnG7o+UPDsALw=; b=lUA0vUOH9ZDoW3AKjB7XyaMKoUwLX1exevaGXnBdRvQnThpY8/VOwDIHci7JKz9BShVrcfvY4ruFO8dqXmZeCuwgZJlgbwmCuVa8REj+Vc2vCHZMi4hTveld8q9p5cTZ28D7ond9emGDSMNPp89zc9CiBL18VxjT61oIf0WnOQs25rAxrNo8ox/T9CjukUDJ7sMAytBPA/a+VyGkgo/TXfqyiAOZZ5TmvAb038jKKr+mqd/3C8v4UuGPnsuqS5ZR4uVg3z9xKQqMgo5p9Q9xS49c/yCZ2o1Gt+nG5ZFBRLEdO837RX6HZM3frXBMM2a69NaPfEPNBGvOVOKusK5aaA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gM6p7keAHnECOjt+PKvFW0zRiB40kIEnG7o+UPDsALw=; b=IaeOYPFLVGre+GUnT4mCkyabO7zcLou1OZFSMGLPD/hm780QREgKM8PyQPefU+YHJ4jTIp/xadiRppD+ncR6J7vp2nlGS+Uav89XxSmMlcmJocMNKBel8wm87jLwyeOHRGwnTTcojoryOAdhxbTbHu3oXzbFtrEjEccSmtp+kOo= Received: from DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) by DS7PR10MB7225.namprd10.prod.outlook.com (2603:10b6:8:ea::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.30; Wed, 26 Jun 2024 16:06:38 +0000 Received: from DS0PR10MB7933.namprd10.prod.outlook.com ([fe80::2561:85b0:ae8f:9490]) by DS0PR10MB7933.namprd10.prod.outlook.com ([fe80::2561:85b0:ae8f:9490%4]) with mapi id 15.20.7698.032; Wed, 26 Jun 2024 16:06:38 +0000 From: "Liam R. Howlett" To: linux-mm@kvack.org, Andrew Morton Cc: Jiazi Li , linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org, "Liam R . Howlett" Subject: [PATCH 2/2] maple_tree: Add some alloc node test case Date: Wed, 26 Jun 2024 12:06:31 -0400 Message-ID: <20240626160631.3636515-2-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240626160631.3636515-1-Liam.Howlett@oracle.com> References: <20240626160631.3636515-1-Liam.Howlett@oracle.com> X-ClientProxiedBy: YT4PR01CA0093.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:ff::25) To DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR10MB7933:EE_|DS7PR10MB7225:EE_ X-MS-Office365-Filtering-Correlation-Id: 24f3741f-c87f-4005-8e73-08dc95f9f56e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230038|366014|376012|1800799022; X-Microsoft-Antispam-Message-Info: JhxLO+qk7QlaND0efNs/eK1Ha7oP85FI/9zQPkhwLEOASFWUAEU98dzqb4lxQVfAi2ZtpAQHrtOd8AO+vAEZByVOgEiXtCm+J6eLH/FNCRPn+F7X2zXcFLoZcQTvz/wz1VlZrB5ZWV5nGq8zTnD+lvPOenIqsYv5i1/NFxNtFyP/ainjgjxqynqedXLqjRfEeSD0lGFXIM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wMCX9t0mF10dbPcjC8R7LKc74NEArp4dFAobxKfeYrlTfu7q2sCsdv1IJ5S1ywXHc440dImg1eIApw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR10MB7933.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230038)(366014)(376012)(1800799022);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Nd71TbzdR6WMzO6Lh+RELeuJRfxR94OBzX4GZ/U77mK8U7GP0CtOfaqI+JkMk/S8fUo1nWBNBiBoo2Eza5qxQrNrHWjCwf0bDtiWP4Q+J4io/XlPP4LOE2r+RWKaLaXYYEYM5I4Zo9o8KlQfyDsXSkwQeDV4B8VAltClzJjAUZclqoMJ3PZ4Df+3nQajTMke/WCFuDUfHEY+tVqBuIJrCs0j75g0P3byLBqXR/5NWdqU71kN43Qtbs3dDV+Ox0iZuxDJxkAtGca016REe7xhqlJwR6enH9qfl8X0l9PCwWuy/Oin1pCuvCwAczC5nZCOsyQ+mRusOCesLRBIfmDe8sI1ItzqhRNfXEv30CP7qIwYc9zsIoUY026ThaqnFnGtPnvKd3mLaT3cV77m3fLZfN1y5YYH3Totne0dYjmcCLP11jtXJVaPat2EcruwtT77QdVlOrzpgRzBmnpZFnMeLIz9AtGDJikRmaDINYeoMx1Ue1G+2Cw01+63YFn/HWvQ6WqYmDBIbJZI9XIWYismHS9ZPIVZUsTOc9n2HhawyWgzNlkve9aIv2rjG6exoZ7LNNT7VEvG9NckiwgkdLNz+7y3og3m6FkRBJZuwmQCNoMQxV8lxoBQYC8oT67bFZ3rxUKwtHU9LZcx+9pbGlfCjaOpNnoTuVVbbW6zzm6VDStWYMsB2FFsI9tNQJ8A1EcA8dUF5bDjZ3hquD5UXJrLqi5dSWNSBzGr7nwShcdj/3VtqSS0GDQI/2m1UX7x3f1UC27QftybgNfzqcU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nr86feN8h5TkCl6UG2fqSHLa8HKyTVkkzCVgVKACs8ZHTT0CyMDRBpLFz05rfhaVDtotkJhfg0dNCuH3xLm1zmGS5VLaZ0fFQLQRSc+3SIPWZjtXnOGGRNeJg1ME2PA310biG9+DfwsDm1VweUmZkWTTKI/73zA01exX/ud7uoznA+jUFyhHFJTeIVzNR495tB5OxhGAxFZognq883+JCCTYMSEkWuGFzQNynGk7F+0+YdKDBWsLruyk4SjoEf1dgiYlFIKBVfBRb5d4+x2Qz1ieD4vZ846u9bHm8FmDFglcuLS1XNekcLcKlBvo4mtM4vhR222XPsMT1yAOqmwsZK6TkzvaPfKBR6avhd51DPQiZnmJ9ogyOIbsQHei8drQQy9fajxdGb77FQ84Qh62mZyRvIbYtnQpO7AUXRBs9g+dZOwcr4roY7HRn7cpG/kZ8zFec= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 24f3741f-c87f-4005-8e73-08dc95f9f56e X-MS-Exchange-CrossTenant-AuthSource: DS0PR10MB7933.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2024 16:06:37.8233 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: w7IHVkWfzr7nmOFTP7mfDAr5bXemAMDgtnFDFvTL345n0RBw+syNrNKec5sQnxfTf6cFXe8aqbb/3v+iGGSn5g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR10MB7225 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-26_07,2024-06-25_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 malwarescore=0 spamscore=0 suspectscore=0 adultscore=0 phishscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2406180000 definitions=main-2406260118 X-Proofpoint-GUID: BCFNCShGgLd85aV7t1zCBKS4zbIaVWF2 X-Proofpoint-ORIG-GUID: BCFNCShGgLd85aV7t1zCBKS4zbIaVWF2 X-Stat-Signature: 84dg4sd4e1nr64esiartgj5etus17w5j X-Rspamd-Queue-Id: 0AAB3A0027 X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1719418003-979000 X-HE-Meta: U2FsdGVkX18Eho4sY8Hmt9bLgGagQRfUX0FRaatt7hB13mwndsBuRhdZgh+XMCh64/PYjMNucOO/Mf6XY9C1xvxFvUWueyp1b0L7FJ2gV+LSk7PcjVgSG+NtHEmrMRtNv9yI0dd3OijxlLUShDsOjJkHifbYsO7KVoC9g1BpClp4/gHAPqNAmqyNXyYU/0+8BIzqw1g7E8uONKOb5fiHjQSF/+a2P/B6a8Ev7AZzsUO022iQxY5Q1LfJEFSh5WRYzhC2davKew+dS5qK/5u4P4SMdAc6BbqiSH8NxMFFUAxPAMyoGQDq5kOv+X0FzebNdX+z1fr1yIbES1yjqtE0sHN3iwpPq6qAAPVBido+C530DkYS/a/4aSRKqVlAMsWXg58uxwuJ8qk8V6FuUD8he0mDM7hlgEUV6Rroe+AyCBKDeNTS8OgsvkLlLsP5CYV5gGMMEyeMPMy2pXR1QTWqUxQ0WYMWSlZQHi8mKa9FRzi+3jAN2iBmQpmYBujmozU25NLKuPG52aOvEWpFeTB5TGudeLaa+0ocXPBxhSMcdVRn67BE+iTcAfP09TP3fvUCIjlxJo0ao1w0leJLeuj2rzgPg4GvOnC7UQcQIUZ3DR9UyI8y7xwo4rDxuzAE3iIcpoID6LhrR+Ux2Jsa2YL3PfPMR1qbFKMam1KKqzoUojd448heExofF3bQq5MUjR8td/bMGNzo3g9bwinf5KRNAmQcmTses8mNyUQQIJL9/JhP9ezaBfD5bgqteIIpQ2nvQOcU0qrYIwcuvmp/lRl9NZSPOeade+9TaVEw8xho9e/6/6Wf+gB1u5SOuX01L+PlQZhzK9pvhScFVgGTxoan/bCTPnqxVIkWF7yCxlqMzAZfvHj6VTsAs7Saz440H7ga/TcRNX0ky5e7Pp6v7W6WY3KIH3VQ1zLydWnfwqBSmw13OXnA/OsaEQY6t2I6DapmJkAG/CmjrJ0PICPO0p9 E+xatIiA u446R7jRGF0O6ctOasqzL76EscadqQdtxFDcQhvNJw4L7h7cBMXR6z4F/40+fBtYr8FHTUj4MuKNRcpL17S3K7uLHdeIV8HWvQeoJ4CliGZxe1YPBj08piKSa8mEoi9PgJ3K+CMx7RIyNu/0bacJPTUC/9AJyaDEEKxCCJaT/QbezdytTgi+/qHvAYqtMsY8d1VZZc2Yqmt3FZcuGzwKP0GcbHmWpQeDRyt1Aq5haf73A5n2DSRRxlxBUDd8v9zuWTO4nm75HlLxHHVVkYS3jfnB1PkTWhXCksd8JXdngsSB7+9xnu5J5DmpOyb9RIw0XOV33/06yqh4lySxGgS7qHgjygXjWfEofLgJhytQ1qslldtU/083Y7pqWvlfTcMGOg10F+31jRE+TUcTqz+xoth7m+7qCdESrVJkeCB6oiaNkOTul1gCLLSCI39OBDyUIsBzVY59hoOztOBvYHbUCD8pZDpYbdagxfcRVocTTMrH5RzM= 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: From: Jiazi Li Add some maple_tree alloc node tese case. Suggested-by: Liam R. Howlett Signed-off-by: Jiazi Li Signed-off-by: Liam R. Howlett --- tools/testing/radix-tree/maple.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tools/testing/radix-tree/maple.c b/tools/testing/radix-tree/maple.c index 11f1efdf83f9..b4b5fd9f294d 100644 --- a/tools/testing/radix-tree/maple.c +++ b/tools/testing/radix-tree/maple.c @@ -462,6 +462,28 @@ static noinline void __init check_new_node(struct maple_tree *mt) MT_BUG_ON(mt, mas_allocated(&mas) != 10 + MAPLE_ALLOC_SLOTS - 1); mas_destroy(&mas); + mas.node = MA_ERROR(-ENOMEM); + mas_node_count(&mas, MAPLE_ALLOC_SLOTS + 1); /* Request */ + mas_nomem(&mas, GFP_KERNEL); /* Fill request */ + MT_BUG_ON(mt, mas_allocated(&mas) != MAPLE_ALLOC_SLOTS + 1); + mas.node = MA_ERROR(-ENOMEM); + mas_node_count(&mas, MAPLE_ALLOC_SLOTS * 2 + 2); /* Request */ + mas_nomem(&mas, GFP_KERNEL); /* Fill request */ + mas.status = ma_start; + MT_BUG_ON(mt, mas_allocated(&mas) != MAPLE_ALLOC_SLOTS * 2 + 2); + mas_destroy(&mas); + + mas.node = MA_ERROR(-ENOMEM); + mas_node_count(&mas, MAPLE_ALLOC_SLOTS * 2 + 1); /* Request */ + mas_nomem(&mas, GFP_KERNEL); /* Fill request */ + MT_BUG_ON(mt, mas_allocated(&mas) != MAPLE_ALLOC_SLOTS * 2 + 1); + mas.node = MA_ERROR(-ENOMEM); + mas_node_count(&mas, MAPLE_ALLOC_SLOTS * 3 + 2); /* Request */ + mas_nomem(&mas, GFP_KERNEL); /* Fill request */ + mas.status = ma_start; + MT_BUG_ON(mt, mas_allocated(&mas) != MAPLE_ALLOC_SLOTS * 3 + 2); + mas_destroy(&mas); + mtree_unlock(mt); }