Message ID | 20230512182036.359030-4-Liam.Howlett@oracle.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 37DB1C77B7C for <linux-mm@archiver.kernel.org>; Fri, 12 May 2023 18:21:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DE8BB6B009B; Fri, 12 May 2023 14:21:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C83F56B009D; Fri, 12 May 2023 14:21:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AB0416B009E; Fri, 12 May 2023 14:21:28 -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 911926B009B for <linux-mm@kvack.org>; Fri, 12 May 2023 14:21:28 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 627A4C1052 for <linux-mm@kvack.org>; Fri, 12 May 2023 18:21:28 +0000 (UTC) X-FDA: 80782420656.17.B10CF01 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf15.hostedemail.com (Postfix) with ESMTP id DFA1BA0008 for <linux-mm@kvack.org>; Fri, 12 May 2023 18:21:24 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=tHdypdjf; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="UDPo/VWp"; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf15.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1683915685; 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=OrIdgrVzXbrkBEQdhLJQ1jIQQYwRAY8yiv0L2JjFINs=; b=H3wv3OOSmWNZfrunBy7RcDBZ/4+S1eJd7gnfMt8XJaZ5c0qFha+F8Qs3vq1N8YxaGqrtZO 6qcuToPqzrSMjjA5i0ukavj1sv9D5NAOuT7Xza3wvSq4ZBUDdI8Pr2sP7JYTlo4no+bCYI 6crwcoxlC+rJfhlWYfepHXapksIsH+0= ARC-Authentication-Results: i=2; imf15.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=tHdypdjf; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="UDPo/VWp"; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf15.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=none) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1683915685; a=rsa-sha256; cv=pass; b=n1J+fNFf6WApvj2ILYGi37DltRI6loysMfAkDHBb0sDLf8rLWHwODZPTSz66opT26FnnN1 8YaEcEud5SuN6VdGyqfcPrfsDdonqWW+AoDpMLWDXAPQRzdtt8X8OPM9EoR2UZN0Zkjxpy nQ8GcAlzwV+WhvOO8Og7OHw1IwjtbFs= Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34CF4aDW021732; Fri, 12 May 2023 18:21:00 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-03-30; bh=OrIdgrVzXbrkBEQdhLJQ1jIQQYwRAY8yiv0L2JjFINs=; b=tHdypdjfxtTCb7ZQrq7ZCqT3syUAiOyyJqckKW96gb3UGOg6POudK6FoIyncam9J07RG C5DP2brJ/f7TLPEJ1hR9pBOsuABhYNElVPP7Iz322mV73vrqRohpJzVKhiTqouTagKTS mLPgM387MLco1ZvA3wKR0jrHYxoS/m6/XLb83NSM3WMRG1hmC8XtPdaBaJEHvjAymBSc s3ZGmcm0y/+Rqupb3qUninVi/tW1FrjeOCP8yZo4zS6SLfsS+n+OYp3dbLAf9eQSAo/8 CZcTJmy/Knma3dLol5Y1u6UGAFg27cfo3pGwjxGROhqRh1K+PiIGS5fdyeU1pZUYvUo0 8g== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3qf7793gxk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 12 May 2023 18:21:00 +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 34CHZraK011640; Fri, 12 May 2023 18:20:59 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2169.outbound.protection.outlook.com [104.47.58.169]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3qf8156y66-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 12 May 2023 18:20:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IJZfUKZXlolKtu0zd4uz4NhTXVvYXYOLzMIz8rhzFe1BUib1lXB5u2dJ/UOz//6II7cQJehntYdnbeFPDy2OniOP2SKsjfV7JzFcO338/EgnaIZC74hU7v+/3N9s5N9hka07RtYJnjxfz/5Kdt7h1ek8ty3DsrcZ4nvVuUkOl1cax7889YI2oK3yNrsxS8JdLHQShYD295qJBODHfsI33gcZWEf5zf3tzVlKglBG5LR7m99jikB4rfq5xVO4RBFn3iI9g03Njm2K5IcsxK81zv54gCxScsFnwdTp8nJ8zQNWyMhk4C0zNh5PmL5JjY+yYQbhxUpi/m9sNNODX370eA== 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=OrIdgrVzXbrkBEQdhLJQ1jIQQYwRAY8yiv0L2JjFINs=; b=J57IqNZZDD2x+xbwYkLG2HxJdtvz3pjaVi1xU9VTJohwh4OouuUtD6S/+SqVaJe4Hu1X5xvsp50gTX6Um4Uh0KRMAmM5nVdkAYhwoY8yA4Ghm/nVzTxorrl4jH28NyFJKwoIzmSZiZrt35VEGNlZeEOkm0SxmScMDGrkBiKOvCW+pdsT+MTF29RW6ngZceHjAtuPbvEjSqsPpqMQFS0jgVvwVC58JiHhBfqavj4Bm11wem0SGWzZDpd6zlR0St7z73Wo9oVDbQLiMgk+rLHxIzGr7iyKgC35SpGKZBRvavWvyHsPGynl/ilTAiMkZ1OwFNvqrmeJL8P56hVeaLnYug== 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=OrIdgrVzXbrkBEQdhLJQ1jIQQYwRAY8yiv0L2JjFINs=; b=UDPo/VWpzA1zBTwXkkp9FgiotaebkGs8NmdH/c+VV8wZMFZbfxlqZzbZxMZrazyDtO4SimmJdyILHZJFMxqDkgjfq7+xArA/kHQeyb5lhWhuEsep9YJ1T/G65c9py3oEmp+7Z5W5vsUOm5tg7bVVOTAGQaUyIoPUnZ7goMBLCvk= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by CY5PR10MB6143.namprd10.prod.outlook.com (2603:10b6:930:35::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.31; Fri, 12 May 2023 18:20:57 +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 18:20:57 +0000 From: "Liam R. Howlett" <Liam.Howlett@oracle.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Liam R. Howlett" <Liam.Howlett@oracle.com>, Peng Zhang <zhangpeng.00@bytedance.com> Subject: [PATCH v3 03/35] maple_tree: Avoid unnecessary ascending Date: Fri, 12 May 2023 14:20:04 -0400 Message-Id: <20230512182036.359030-4-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230512182036.359030-1-Liam.Howlett@oracle.com> References: <20230512182036.359030-1-Liam.Howlett@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: YT4P288CA0065.CANP288.PROD.OUTLOOK.COM (2603:10b6:b01:d2::22) To SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB3022:EE_|CY5PR10MB6143:EE_ X-MS-Office365-Filtering-Correlation-Id: ae32d136-aa02-440a-b54a-08db5315a193 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XuQBqx3Dz0qwxAX+reHa8d4a8fsYEHxqBY+ncfAWm+Od0HiJioZl1W6uCJKyu8ek5LG5Jvh6pKXvNvDLZfpmxYyv8fq/cRkZTuJZZmfKhq4VIqVdXz04FTJWa82iJcGEGxRfSrDDURNsPRbUuxTbQx0a/kz16i81vpKYV5IN3IBOw+xNxtJP7vB4SCMtj14gkQXuOEwmKN7yh54zyLEiRGb2ZRRaPrECUfh4AWCTZuaPxIHJmX5PVLEEl9eKOPVxGL0UI9NaXR/+IXpio4lMhI1roVqd+CXTRdWzyOWkc/1LeFaioWRK5w6p88CssWXC5/BHbkPKQs3VSgGE2S5dhmN3XxOPP+rnwRdjMFSN2DDUwTkVHn8oMCxfJxU1UuZkz/8jAmnqFT+2+xoGKdIa3dKpu9pYmOMIy6qBR+AYuwL0bhirCs3oXDcxHAlXaeGfCTjOV42Z+azj3VF7btsD0mPOzYiK5KjDNzMGrIj7Z+S8WfWvpHtXa0iSgJS277HmWXJC2juxEJpTc4x2vGAD0G/AuIJDJYOFD6Fuvn/DblQvsv+wtleIGyledigix5hN 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)(376002)(136003)(366004)(346002)(39860400002)(396003)(451199021)(2906002)(6486002)(66946007)(41300700001)(316002)(66556008)(8676002)(5660300002)(36756003)(4326008)(8936002)(66476007)(6916009)(54906003)(1076003)(86362001)(6666004)(26005)(6512007)(186003)(83380400001)(6506007)(2616005)(478600001)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: UZBlhnd8arDdovFB+d9K0n2y0hSt3PXVsr9rQLemogc9HAWiMCTtlz2IPHr4neLQ9aZ6FHcUBW4AdqDmCf0WHAsud3Sg9vqlBbiRruZq9ascvSjyap214ULVMIUp10Fc265VWV08lsZhmdixxWl6Uq8yXQ4PnDMQD8O6hhnIOgoRQmdo9exjffLzXfAKqR9sKYGkW1I1BM9Sr4j/XbmUCvX5JXxC+gJMedfAJYYBCYd2w/qSFTreBAS1xf9Tt0vSKLURsoZ17EpdUJdJGFyRGnJYOAtODM5T+iTsOtGrUtm0Hb/KE6gfW7e/kCGfC16H6UkxeJ9RsfjHKHFgEtrcqCTfTlXa8O7lwDPpFR4M6Q1ImibYFxj1njpr0Gzl2vW6jsyCNGpDsM4EwmaUgw+2WR6LWEwsk3enJhb7zSUgiif7cZhuexaPZlYs+d26bOv2dvlF0+GREBb0Ydha+oCR7KI2pkW2LatHfHlsLu4GSH6vbNCdI+8P0l7nQ/4xyLRED1DpANLaMDOS64DwJaCT1N12VYBWBLbS1Siompy4TKvmMYvyNUgMYeWbM09gvpN80ze56zzZIak/e4BwwPAvscLrJiWApCQThfw0bQHh4a7tFAMvro0anMgM62wY+9lW1rVlWJdqgFBz+UjaFx+eqsN2DPfJh6mdc7wu03sCumPUGgXiLrhvI569unDzs93RONjV+XZWlLVWV7G1qcDTq+nRcy+jJz9m9ojj+E1vvtdq+LpAYHVPMMUgcRsOKHo1ly5Nu5qMBi9wGVeBwP+V5OCqRX6/cULV4KROKePrEnUu0+R39VUxWfOnbEUdBTo31FlyjGl+kY+udr3Wz0T5N8DMMLLP3TSB6c8pFBi/3pbBb2JylwbRNAxzeHVhVvQ0d+e16aX+nkLfKSNPzYrq4Hkusepdf1JkMqY75U0RAqtGWQeVlZaHAyUIO4TQYdhVgAFxbwkdgNUm1ctd+ZxQCJ6E8SBGkWead6DqAUi8X5ROD+HsPVadvOyB2Hb2har9BHYfCT6/Z5AcLjRyBzK4C2BI6KzphehLR67JNigivn9zY04r6MQJHzJ5OvPCZnsWM6m4ruID4IbWy9+v/LeiUkbgvJVbVN/TQiUX1RGe7TwXk2j9N4IfotCL8hjqsMlzAd4fzgfVs0kpnlvDJHk+3fJAOPC3esI/rHwE9pJWj/HI0kCehzfSs8toccx3q2pSVcNWdI2R53d7R0w5oZLYXhWHVDU7kNULg4hWckPQvCT3XOgbiMbd4+dJLfAExD7UilBNTbNd3WZUUP+k1U75cQaF03dlcPeNhVnvAya8yVa0xTiz1RewwCjky5aQ2ciKqqTWuUDhc1PGznuU2UG7R1C4V1Z6C4BccC9W4z58ZAyKRvaSH+TN4BjGoVhPS+hw704doygsARZobrhXY7wLfuggEll52l9QX7zA5mW6/mbky4sqfFmWIld1SCpVgP9EOgCCSqi2sh9ul6p7s4doUpid72EjI9g/rrIsv9nzwdU1Tvz4cUtnEY1HJavPRGyQ5ad6sgFU+W7Nzslc7Ei+Ghh7HTPm+/CmF3Afal9rK18HJAQUNfZLqzQmy8MoE9XXFB2lzZLlPY6sgzwJUSH4yw== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: GRW9Ah87ZBh+AYbTwUkz79/R3bVwWiyIDreHswVcUlUCpJAf08UC9LL3mToSmKNSZB8vf6Fpitq0Tcv4mAn+Bp3n53vxtmFjdshY5FDwIoGwaxbzsupTxs+Yjsoaj5bMYb48AVsLnv1d0KifWzXTgLyMhEbBIfUOQqQ1ZmVOHtytbhAPyml8vCB9cKVVvcZkFP936tXBYEOWOgokYof5JzddHbV6RNUT0u8nl2eE7zstlnS8rPLM55Uexnw01G/kBFpXWwHoXlc+0uP8Czb5zR3qKQWQSB+P9MCOEyjW/3d6lGO97AvOXlN8jhcpHqIhnIHxTPpHG30CpkAhCdcpILippjYWi7U5rVaac9edcU1keVuIlZir1jY4s/CNsFRfiWeB8mOfcGTcf2ruJ701LAfOcRKpWsieHoEGx7bvXSqpoyE88BYKKMbxh1YOb+/98+LhSDcxWMLgmexVyAGy9DEKpgKCNVifikPWf7egsme5Rmu0wvDLd65ADe5VUA8SkWlUmGGspCUFSvPcq5YSlBI7cJOeOF20l3saiYjqbZqPJ/S7rQNASkN9eCbbvVHvlUebvBbVHdziiLlrkv8sF4RrZEnbrb0I1TN32OtlmMH1lGo19s08Blc59HmTmh2Wj2PeAQ4O38IcU3q9WEOs2Z0djJX3EVFOI2gnqFrOvYyisjLUBRd1n4RnM2z4dIccmGHORzrsRh0sG/6nhxj/7vKEZ8Ioc0HOMeFTthszPPLuoH8L2g9hzQ10ODt5+xZeC6+L5qHhYF2awWcg47tYNXFttSFKNG8bbwsF68i4WrCelqtQa/6Hj6fFU8TvpxRLrh+/7lJZ5rW181ueuPtahtWBOZXUc9NGvzy7eYqShjMsZOH7YgKKOrCurBwqLZ9T/w6+E042t1+ivOYMQ7CKgr0x0HY3BhC1uX11x3dEkjvRtfpY/ZtNSJ5nINstEwHL X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: ae32d136-aa02-440a-b54a-08db5315a193 X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2023 18:20:57.4613 (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: Icv4zmrDEMOWwPAvndTXDVeACceBINChEQE2/oaSm7gdNWqQUnqy8gk2N+1LIeUgZxJo7jKS4FcQK43UhW+KRw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB6143 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_11,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-2305120153 X-Proofpoint-GUID: 3HHVyC-czsEa0bkoVtRRgqWx7I2_SGFv X-Proofpoint-ORIG-GUID: 3HHVyC-czsEa0bkoVtRRgqWx7I2_SGFv X-Stat-Signature: 9ck8pofd5frsspthfsqcf8j7qcu56kpj X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: DFA1BA0008 X-Rspam-User: X-HE-Tag: 1683915684-371793 X-HE-Meta: U2FsdGVkX18v0KTyO+nz4H1lkkMUi3wKw00TZJ0minpn4Y33C3cYkoSiOBzBNmGhycDfmIdKCAPTHN2oxT6H9WDMBT0Zv4cjGkkuJtvceJvzzSXtLiw/FWCJnp6AT5m7PusDEbnR7JQOMZLKB85MLoQPN2Jk1YBynp0rq1Ydw4gFiicelW0V47BpZaTs14nOVOhjk6uFRYPVvhouJiAPRe0itbLnlVcEFRe6vJiTjj4ICa3bmmMgM3QHrMBNBv3gYpud0XiZoGF7E6bHtzNoo83xkLJAtssMGEf2q24EolEuIu6dGGDxVJH5+RFXF5wr/2+/XOtM2Son+Sej0Vq594tgFDSQAPtu3oAj26iyqeGalgUTlCGuN0BD8Mi5f7Ntu2hsMSYLEqJj7/PCCFuxz/cPgCPScFzWw9xSaxEoaqNQcK40/xZMhbXW03E6FB2kf3vFOxIRjsrp47FjeaoI+ILvxZRpJRZF02b+UW1tMdNcbc3Vyt6MAqkxuYsdqssJU6GnyfeGV60sGdhK0u7tBLepTjRqav+dDNTAQ4Y/+iT4P6gzuA/d5KT3SPdOvVx8ipdbU2aYiDjgYxq2gezhzObq38N1WZsUoKZaPwSdWePPFE7z1PTpxuWPJt4Argbiv2SPXG1beoIKkEG7LWq/BKofeenzGSYgno+FAXcCOGQrS284F9N5GvA7O4mdxP9GILLpMxJB1BGY8z0zWzOV4zgKcye/dVP0zX31nBSsqb0PkxR3Xenn3+IdIA7pt59th9RrkwV7tB6jjFVuvZH9mQYPeqDrdbjnK4LA6urGRC+1BACzPCYuoHLZCa7q0I5da3HAldOMwzu28G+vLvQ9hH9AXvbIUb6sNRtzws4uJA3vw/EjhQGpaeOhHEl4J+vFWh6rF+CG7itxbN7ZFkDYD3aO1ZVjP9lsHNzlD+LDG3M5e68fTibN2taXIlOPFJQgnxh/fivmKdFlstlfQMf gtI2l+ea WgpIkyTQrx2fuo+xU0ZNutMJfWRdezSxSuMkEfZDQdB5QUtZgT2tEdmCEoP1BBV8cXlu1y2bTNU7tO7svUBKT0Y/T8nybGfKpgA7cPT/VCMSKWC8LF9eLHUrzFzynynCK7cTivcH4VYwGZrsOcGZ1tlQttqKKiaV9/sCPrQO9hAOuzx9RHRo0FQaM24AzsqWb6271IhfKiM3jzBQ7tZ41LG9h+BMqNwF2y/bIaxC+uVXwSP65e/pGEpCkbAsbCQD+z6kmy8cZJhBawSnw4uq8uS/ZXYWi4ixsLvhCCUUEbG82PjykrbGckrqIuqlRRUYBdporyXrAenI1VTuvTmRTSJYJW5PrIVE0ndY96zDtkj/jwX6GwHunu32gJZhgOxnedsd8PmF4Wwe+0RzEMpkjoH783ZiVNp74MqW5AJA3DEeuimw4eAf1PEXpPFK+dJ6S1pjq1SD3A0M7YTTUARVadNzDQXWIUgt4WnlE 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: <linux-mm.kvack.org> |
Series |
Maple tree mas_{next,prev}_range() and cleanup
|
expand
|
diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 555de3a8343e1..5b29d5a916f2c 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -1103,7 +1103,6 @@ static int mas_ascend(struct ma_state *mas) enum maple_type a_type; unsigned long min, max; unsigned long *pivots; - unsigned char offset; bool set_max = false, set_min = false; a_node = mas_mn(mas); @@ -1115,8 +1114,9 @@ static int mas_ascend(struct ma_state *mas) p_node = mte_parent(mas->node); if (unlikely(a_node == p_node)) return 1; + a_type = mas_parent_type(mas, mas->node); - offset = mte_parent_slot(mas->node); + mas->offset = mte_parent_slot(mas->node); a_enode = mt_mk_node(p_node, a_type); /* Check to make sure all parent information is still accurate */ @@ -1124,7 +1124,6 @@ static int mas_ascend(struct ma_state *mas) return 1; mas->node = a_enode; - mas->offset = offset; if (mte_is_root(a_enode)) { mas->max = ULONG_MAX; @@ -1132,6 +1131,12 @@ static int mas_ascend(struct ma_state *mas) return 0; } + if (!mas->min) + set_min = true; + + if (mas->max == ULONG_MAX) + set_max = true; + min = 0; max = ULONG_MAX; do { diff --git a/tools/testing/radix-tree/maple.c b/tools/testing/radix-tree/maple.c index 9286d3baa12d6..75df543e019c9 100644 --- a/tools/testing/radix-tree/maple.c +++ b/tools/testing/radix-tree/maple.c @@ -35259,6 +35259,7 @@ static void mas_dfs_preorder(struct ma_state *mas) struct maple_enode *prev; unsigned char end, slot = 0; + unsigned long *pivots; if (mas->node == MAS_START) { mas_start(mas); @@ -35291,6 +35292,9 @@ static void mas_dfs_preorder(struct ma_state *mas) mas_ascend(mas); goto walk_up; } + pivots = ma_pivots(mte_to_node(prev), mte_node_type(prev)); + mas->max = mas_safe_pivot(mas, pivots, slot, mte_node_type(prev)); + mas->min = mas_safe_min(mas, pivots, slot); return; done: