Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10527478rwr; Fri, 12 May 2023 09:13:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7PoWBGW4+84+oV4hRyoF8sFnoYZxuFqm5Dcb1Tn1SMvVnQANoEsuOtj5DPbXF4dP24YdZO X-Received: by 2002:a17:902:c950:b0:1ac:71ae:ce2f with SMTP id i16-20020a170902c95000b001ac71aece2fmr27062029pla.20.1683908028370; Fri, 12 May 2023 09:13:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1683908028; cv=pass; d=google.com; s=arc-20160816; b=yJzJozChX6yxvRS+aTqOh8xiQD50/rkgFpRy7okS92kqD63UVd0StoowGg67BoWpKH DSOzkkvEo+Nba/oL6I2rswZlF3gAOGUR14Uckx/P0i2pSzefkx4Ri7AZshFu7iZzpSCi k08UFZZFpC3DCOQYx554ui3UpeEXie+Ow5wRrVN+nbZNo5RYHdNBfIL4kqPWdlihCzGo B1C5f3/dNCKh+NVTs+z7O+9dJqzIK3XETzDSnfnc4wP2qt+UfPVNmKMfqqaGtldqq4gp L/WYG9+v4BCZS5+7lVVm5KKr5263ogH/J/D61fdAFrejHviQfKMpGfV1fuvcPp0OonT4 EFcQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:in-reply-to :content-transfer-encoding:content-disposition:references :mail-followup-to:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=ox6HyPOFsGCQWrDH2VnrM/YYxETcNZj4j1kXmyr3FHA=; b=b5duJOlnb0zIpZLzgJcx00f61Swn2+RweRrcY5OCF9j4apzSX5OaybYXuLTx35Sb8/ BwTKW+osOEfl5b87kh//RWnBIdoXqkp3hIO6FgFwlLENHFo6Vp+xBZVnb8cGjbopSsEb aGjmlmgNKU4Bl0gA94CaHAgTQzF/7Q+vQb7breZBnXNinQ8EPQKnBRO/bDim2JjLRmY3 NlT6s99ThD6kDd4Jnph1XAO/VRSq9hP1AcCyDqDFfBsUAizpEXYaPXPxxphgxO+vvpaR LH5vSk8R7RoUiAp/56k4qAJSMcVIEpPSIPo5GQMD5QFzSonJODKGMVFmmow1G6rhLWKk B3Sw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=eqoDwQdf; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=wUntJEwD; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u8-20020a17090282c800b001aaf3ac2fe3si9448248plz.177.2023.05.12.09.13.36; Fri, 12 May 2023 09:13:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=eqoDwQdf; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=wUntJEwD; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241580AbjELPzT (ORCPT + 99 others); Fri, 12 May 2023 11:55:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241992AbjELPzI (ORCPT ); Fri, 12 May 2023 11:55:08 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 449D33C2F for ; Fri, 12 May 2023 08:55:06 -0700 (PDT) Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34CF4ktS023033; Fri, 12 May 2023 15:54:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : content-type : content-transfer-encoding : in-reply-to : mime-version; s=corp-2023-03-30; bh=ox6HyPOFsGCQWrDH2VnrM/YYxETcNZj4j1kXmyr3FHA=; b=eqoDwQdfxnPC3j3SypHcHm0JJ1Q351WGn2u+UQ7TJFnOANrc9zbbo/ld96tTpZqspOJN DaxSU6tE6AGwHqFaFlk8NGR1MPdVc5J0VyMgXj5ayPrQkK3/f5/Vq5wQUtr/H70KrDsW 8b6imO1EQr1JGWIVdBfIvxf8PnuQpU+mlBB4ruUJIXpnYmZaWUQIkV0LAmHIGF2UbIww T0Hg2QWKFYgwaG7UCGzdnBAixetwf2aZ/MZPUJ+Hgedzn2wktfQE3PtLg3Tl20zqXGpK YJZbZ91qLBbAEnsWu5RkHtDX7Aex2cgnYd9eNd4PkAfmc3UyWxXmjZElWAbxTDzDQyoM ag== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3qf77gb2d1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 12 May 2023 15:54:39 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 34CEYoQD011834; Fri, 12 May 2023 15:54:39 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2173.outbound.protection.outlook.com [104.47.57.173]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3qf8151juy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 12 May 2023 15:54:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O1K7SM2N4mIFY+n6XSRSD8WzvxLQmVq4cDIMnGgvu7TkVNcT6F2fiFKiACKvvpvfZ8gJD5oaq4v0empsWvMdjhQRu+9MvWuOFSuHbZGd7GWHCP573gl/oxIj26p97FEVKB8+FnvODgO6S6MHLtxVR4YAlhjzEFfdDtFqVTlnFQKlYHVJBxMbwZgKqaYDqeZut7F/kLYHbrZV8jPKLiaiUMeBi9ZdAVe89nIZJFZ6SFCSCbIKBPYjOdkGgclB8u6Tu+ldRNrcctLZ3Lh44S9uPnYHsLz4GEHRmynONrKnePBBPKMWiXph1PyQJ6jeiGOYfjvJH73wqoKr/tqus+vH/Q== 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=ox6HyPOFsGCQWrDH2VnrM/YYxETcNZj4j1kXmyr3FHA=; b=bRo/S0u1iofBiSuoob4BhpFZfm+OvAvLMIEbHCWUvXOBDSr+aMMevlN+lykWeUVTobVX1OMkheaTSfbrzVPLK6VEKuCX7jOUrZHvA9otF7UGW9UbbeL7uLZ8cWk9tJc656F2e0DXrdtKi1omdHHD9qUWn8MW4h8Dk8LaAuhxAhAuMn3eQYB6cf9Bn6YcvWKJPAu5EpeWLuQx7gsTM/BvzgUD9lcaLsngy52CqMFVFVYU50p8w3YoAot2JnlW61k/1oHsQCRtjjLmUs2LNV5h6/PtESF4S0EEW11yYbHi3mRDoXT00OaYG3XS8YcJvdu+GpsyVOCLOsI1Bjy0vDSutA== 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=ox6HyPOFsGCQWrDH2VnrM/YYxETcNZj4j1kXmyr3FHA=; b=wUntJEwD8Wh1PLjLfVgDcZqCzhAEyHRqqBWw5Ld70neLa9ubyruI+e80kblMmuQ2e/d7ZM/5Juhspqbnb0ykh8Giq6uAtKmjboydCytr3nH7NNnYksn8QXmS383Lsh+qCeyJJ+vhJPf+M1xkq5NSKxqyx2nX5DmwPFFY55Lv3i8= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by SJ0PR10MB4637.namprd10.prod.outlook.com (2603:10b6:a03:2d6::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.23; Fri, 12 May 2023 15:54:36 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::c478:d218:8f15:37c]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::c478:d218:8f15:37c%6]) with mapi id 15.20.6363.032; Fri, 12 May 2023 15:54:36 +0000 Date: Fri, 12 May 2023 11:54:27 -0400 From: "Liam R. Howlett" To: Peng Zhang Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton Subject: Re: [PATCH v2 32/36] maple_tree: Clear up index and last setting in single entry tree Message-ID: <20230512155427.dyoymejdgnitfkcu@revolver> Mail-Followup-To: "Liam R. Howlett" , Peng Zhang , maple-tree@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton References: <20230505174204.2665599-1-Liam.Howlett@oracle.com> <20230505174204.2665599-33-Liam.Howlett@oracle.com> <5ca5da7f-1b17-b22b-58c4-eae41443e334@bytedance.com> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <5ca5da7f-1b17-b22b-58c4-eae41443e334@bytedance.com> User-Agent: NeoMutt/20220429 X-ClientProxiedBy: YT1PR01CA0124.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:2c::33) To SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB3022:EE_|SJ0PR10MB4637:EE_ X-MS-Office365-Filtering-Correlation-Id: af3f4ce7-a987-47fd-0175-08db53012fd0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OqbqSQJ7NLM9vtpQ0yzssNq44r2pm1izs1u4vL6ogI3TEwFzI2rxfwWcMPsK2SoU1YqC2S+9KlxkKWvILmBOCWf1ONPKO0PFY5OQbwjljR5hujIz7N67uMhZEY4trd7FlweZ9FVwyQRkzi8eRgEZ5QR4wMmEVZgqudC7xRxDA8f4ntXEIBeczYyAZ4yUPqfvf+cny9HNxNw9hSnGLSKGY9AcPYQoOwMBeSMMkt65JCaMQuqL6nbOo4WnxtLh24E6wfr/Kxfl+t3cnfEM1Sp5DblipqDXH9xx43rUmlcY23Hu9uUpr3O0w2sxhltTIUm6Z4wo7EzXMVn6EBCFwpNgtMYPRYGlY9a6vC5tAGnAa1YNkvXVrQfruqzHE15Bri2GMMVRGop+LQ7zWFdQdjXlGhZu08exvKWVMvB3I1bdg0AnmrGgOea02QlP9zvFvASDPgmLCeIFfrkpxXP1P7CkJqeHaU8J7wG/VPIMVIv5qYWXrAsihrK4DgrVrWd1vouDmq2qLpMw/2HpEPkKTo2pDxf7etqTziaynpAjPYz0V7JfKoXdnZNYe9NeehKhdZm6 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR10MB3022.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(7916004)(136003)(366004)(376002)(346002)(396003)(39860400002)(451199021)(66556008)(6916009)(66946007)(4326008)(66476007)(478600001)(316002)(86362001)(6486002)(83380400001)(26005)(186003)(1076003)(6506007)(9686003)(6512007)(8936002)(5660300002)(8676002)(41300700001)(3716004)(2906002)(6666004)(33716001)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aTJUdktPYVVTWHgwRmdLY3h6OC8zRmZWUW42cm9SamNYSWF5Y053NUVORzZJ?= =?utf-8?B?ZUVrWFQ4NEdCRXQ4S29vbk1RYld3QzRZZFlOc0RWbmJWaldkVGM2MmdyNDNh?= =?utf-8?B?WlN1NjBIRU5wZ3k5STVOQUZHZFpYYzEyRysrNHgyY2tuUWpqL28veVI0TGto?= =?utf-8?B?NXVDckJtYXR3Z3JhMUZtNWJISmk3cFltYXgyWWZsaUJPV3BsY0hnL0VCYU5S?= =?utf-8?B?eHc5TmNIVHU5SFVMTlRlbFlzNzN1NWpUSTRWRGJCQTMrYlVtNUZEcXEwVjVC?= =?utf-8?B?ZXJnZkdlWWk4R2JPODJ4N2JRVThhTjZkbWU4SzNtVDFwTWlsbVV1YWZiM21K?= =?utf-8?B?cnhCcGNrU1FmVTFjQmZNNWZYZis0bWpuMm1obXdWd3liZGpad2x3eThNO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?NHhJMmtER2JQbFprYXNlYy9JZmtQRHViOGV6S1lCZWdBK0h1UzF2Vk1WWmVN?= =?utf-8?B?WkFQQldHdVY4aGVJK3NlZjIyVnE5Wm01WDZnYnlYd3JGN1lPZ2dZMkNZTDNw?= =?utf-8?B?RUV3UC91Y1Z0M05vd3l3TittYkhSYzloTHdZTnVMZzQxWGpKSWdKMDdoTWVL?= =?utf-8?B?Q1pxOXExZEl5amh0VTBQMjZYdXF3MGNSZ05SZEl4a1JPVkdET0VVWXl2R2VD?= =?utf-8?B?cDF5aU4rMko1VmhwZDlFZ0g1ZHpuTmFtcklaTUFnOHhISkdRRFNCb3EyVXFV?= =?utf-8?B?VFhIbFlBK21xTUNnRklGUlVnZTZ5dmFjemg1Ly9RcXVENjZBa2dDR25nM1da?= =?utf-8?B?YmJwQjhzWVJXNzErdzJ5cWNzaWRBdWdGTFBwWnBaaU9WeFl5UHFlSXlweURn?= =?utf-8?Q?vPeD23a40gswgb3?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: af3f4ce7-a987-47fd-0175-08db53012fd0 X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2023 15:54:36.7329 (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: HCqKgTac0CCB9TC6RQrJEa+dvB1qqwjb607agmbCL7hC6ES6ZQfJZska9yHq2iRZSmDusy/T45eyaiuyPb5QQQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB4637 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-12_10,2023-05-05_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 phishscore=0 adultscore=0 spamscore=0 suspectscore=0 malwarescore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305120132 X-Proofpoint-GUID: T0QYnOPyLFGQ9LnQWgL2gs8KkUVKQya6 X-Proofpoint-ORIG-GUID: T0QYnOPyLFGQ9LnQWgL2gs8KkUVKQya6 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Peng Zhang [230509 08:39]: >=20 >=20 > =E5=9C=A8 2023/5/6 01:42, Liam R. Howlett =E5=86=99=E9=81=93: > > When there is a single entry tree (range of 0-0 pointing to an entry), > > then ensure the limit is either 0-0 or 1-oo, depending on where the use= r > > walks. Ensure the correct node setting as well; either MAS_ROOT or > > MAS_NONE. > >=20 > > Signed-off-by: Liam R. Howlett > > --- > > lib/maple_tree.c | 21 +++++++++++---------- > > 1 file changed, 11 insertions(+), 10 deletions(-) > >=20 > > diff --git a/lib/maple_tree.c b/lib/maple_tree.c > > index f060c71965c0d..914399519cf54 100644 > > --- a/lib/maple_tree.c > > +++ b/lib/maple_tree.c > > @@ -5022,24 +5022,25 @@ void *mas_walk(struct ma_state *mas) > > { > > void *entry; > > + if (mas_is_none(mas) || mas_is_paused(mas)) > if (mas_is_none(mas) || mas_is_paused(mas) || mas_is_ptr(mas)) > > + mas->node =3D MAS_START; >=20 > Hi, Liam > There is an issue that it cannot pass the user space test program > with this patchset. > I tested it based on 47cba14ce6fc4(linux-next/master). >=20 > The reason is that mas_walk() does not handle the state that mas is > root. The root cause is that mas_start() only handles the start state, > and returns NULL for the root state. When encountering the root state, > we can reset to start so that it is handled in mas_start(). Thanks. I'll have a look and adjust v3. >=20 > log: > BUG at check_state_handling:3076 (1) > maple_tree(0x55d6a9838ca0) flags 1, height 0 root 0x1234500 > 0: 0x1234500 > Pass: 453406336 Run:453406337 > maple: ../../../lib/test_maple_tree.c:3076: check_state_handling: Asserti= on > `0' failed. > Aborted (core dumped) > > retry: > > entry =3D mas_state_walk(mas); > > - if (mas_is_start(mas)) > > + if (mas_is_start(mas)) { > > goto retry; > > - > > - if (mas_is_ptr(mas)) { > > + } else if (mas_is_none(mas)) { > > + mas->index =3D 0; > > + mas->last =3D ULONG_MAX; > > + } else if (mas_is_ptr(mas)) { > > if (!mas->index) { > > mas->last =3D 0; > > - } else { > > - mas->index =3D 1; > > - mas->last =3D ULONG_MAX; > > + return entry; > > } > > - return entry; > > - } > > - if (mas_is_none(mas)) { > > - mas->index =3D 0; > > + mas->index =3D 1; > > mas->last =3D ULONG_MAX; > > + mas->node =3D MAS_NONE; > > + return NULL; > > } > > return entry;