Message ID | 20211005012959.1110504-49-Liam.Howlett@oracle.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=pyM+=OZ=kvack.org=owner-linux-mm@kernel.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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2293C433F5 for <linux-mm@archiver.kernel.org>; Tue, 5 Oct 2021 02:33:02 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D5D74613AC for <linux-mm@archiver.kernel.org>; Tue, 5 Oct 2021 02:33:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D5D74613AC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 56BAD6B006C; Mon, 4 Oct 2021 22:33:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4F4A96B0071; Mon, 4 Oct 2021 22:33:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2D2D1900002; Mon, 4 Oct 2021 22:33:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0132.hostedemail.com [216.40.44.132]) by kanga.kvack.org (Postfix) with ESMTP id 1B0EB6B006C for <linux-mm@kvack.org>; Mon, 4 Oct 2021 22:33:01 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id BD31A32082 for <linux-mm@kvack.org>; Tue, 5 Oct 2021 02:33:00 +0000 (UTC) X-FDA: 78660811320.07.E40031D Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf16.hostedemail.com (Postfix) with ESMTP id 5FCAFF0017EB for <linux-mm@kvack.org>; Tue, 5 Oct 2021 02:33:00 +0000 (UTC) Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19517AuH029426; Tue, 5 Oct 2021 01:31:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=RFAj0fpAex/rtgYsOHi6IMFmwSN9+4RGdqg4BN60GSs=; b=OJoLgA+nFEwMgIy/tSoMOAY9//sn6phtRNHZoF8JWUa6le7PflEuRl0c7hAXM692MBXa wwX/TH8Ho5qz/MwYsAXgJY67CKV46GllcHq8RyzLNZLJSfO7RcWMOe87XgfbDWchqV2t 8lTxd3IX1apuRbnxh6azQ+6PneLy+qhjdDWEPtLisdpNPBLDaHE4QmZ8rDNlSZFxEa79 jP7ciNzR+s8E33DtfTijcQJUvcXdBBZNa8UX/tqXIBM9ByhhvhIUwcYjAdkS8YQegG5/ 6yi25xNdcMrmg8cx+T8z9XFDWWEPMODBiThIGbYSlr87FVSUa5rRqXAI4yBpfS9FyKVI vw== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 3bg42kkyd8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Oct 2021 01:31:30 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1951Tu3v056799; Tue, 5 Oct 2021 01:31:29 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2175.outbound.protection.outlook.com [104.47.58.175]) by aserp3030.oracle.com with ESMTP id 3bev7sgru8-14 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Oct 2021 01:31:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O5U1zvAwyHkGxrGOmw8smuXYKEKh834G127WRXaJB7uhp25l1fcpuXI/+DRJarFLag5APZG/t62w95Q+iHx8OPHMq9xckZqlgSme8U4LgZTK66Fi+oG0MlF1t0u6jrdURhQegzd2+2U5p0HAeGnqpFGX+MP7tphpSPTfV896c9kA+BfXzsYEba0MRMGHqhcz3Yy6TuaGu8dhNfFfEgx62N2UCStO9nSVSXeRVFCKc82VS1JoMVeyc85pMuZTMlCquf2xzmzVAiDMV/eHF20HvtzY0JvTmnsKExKUGhiIahYKWp0T2rRGwqOPvQdXVbKjrW6UtjHfQPDjVM6YnkRaEw== 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=RFAj0fpAex/rtgYsOHi6IMFmwSN9+4RGdqg4BN60GSs=; b=UOCg3sr4qvlb5cqT+cEtGlj534+pAe4VILFfSuWHup4ab57nqRqY4tNfP4ylWepFTVQMlawmLb1DnU0WF0tnN7Kc4BuW1LshDDRwqx/v3de7XqyTaQ3UJsCbmF6Qg3jwcjypzyBrSgALy1nkRKIqC9Nn0iA/BSClgvRR3QLaeWmYRYANqbPza/4l81yLo+E6f6gAcTDxRBAF5p79drmL5OkS3TSVejhm60CcX/xR/W8JnA+fEu6OoLJh2XlOjhy3PgTOdHQ8DOCf/wAIn3pi6aXZbVzgYbfrjXj4XIAbdjbs64SeuExqbVlXrh5MGoYYVR0glnUMf+ow4fiAVm3I6A== 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=RFAj0fpAex/rtgYsOHi6IMFmwSN9+4RGdqg4BN60GSs=; b=jzvZ8JJjAU8mGog/zr8y/+iQpPOG9RIbGX7AWM7HrAOEjPtwnafOrWFAFWHALyfwaF1XHcLnembZ7e49sY5FphNnkyB9qQ82BSYa/Tv8b10G/KkDHKP8dyaxFrrCsxtfAqCdqVM3aIek4+4rr/kyGqZIYFmyjsC77Fxvua2nO3I= Received: from BL0PR10MB3011.namprd10.prod.outlook.com (2603:10b6:208:7e::29) by BLAPR10MB5044.namprd10.prod.outlook.com (2603:10b6:208:326::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.15; Tue, 5 Oct 2021 01:31:24 +0000 Received: from BL0PR10MB3011.namprd10.prod.outlook.com ([fe80::6d61:54c2:40f0:93a]) by BL0PR10MB3011.namprd10.prod.outlook.com ([fe80::6d61:54c2:40f0:93a%5]) with mapi id 15.20.4566.017; Tue, 5 Oct 2021 01:31:24 +0000 From: Liam Howlett <liam.howlett@oracle.com> To: "maple-tree@lists.infradead.org" <maple-tree@lists.infradead.org>, "linux-mm@kvack.org" <linux-mm@kvack.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, Andrew Morton <akpm@linux-foundation.org>, David Hildenbrand <david@redhat.com>, Douglas Gilbert <dgilbert@interlog.com> CC: Song Liu <songliubraving@fb.com>, Davidlohr Bueso <dave@stgolabs.net>, "Paul E . McKenney" <paulmck@kernel.org>, Matthew Wilcox <willy@infradead.org>, David Rientjes <rientjes@google.com>, Axel Rasmussen <axelrasmussen@google.com>, Suren Baghdasaryan <surenb@google.com>, Vlastimil Babka <vbabka@suse.cz>, Rik van Riel <riel@surriel.com>, Peter Zijlstra <peterz@infradead.org> Subject: [PATCH v3 48/66] mm/gup: Use maple tree navigation instead of linked list Thread-Topic: [PATCH v3 48/66] mm/gup: Use maple tree navigation instead of linked list Thread-Index: AQHXuYip3R5qiwJ0wU20Bjo/5u64qw== Date: Tue, 5 Oct 2021 01:31:04 +0000 Message-ID: <20211005012959.1110504-49-Liam.Howlett@oracle.com> References: <20211005012959.1110504-1-Liam.Howlett@oracle.com> In-Reply-To: <20211005012959.1110504-1-Liam.Howlett@oracle.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.30.2 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8df020e4-35d2-4ff7-e9c8-08d9879fd818 x-ms-traffictypediagnostic: BLAPR10MB5044: x-microsoft-antispam-prvs: <BLAPR10MB50449AFDC3593DFB20EC3D82FDAF9@BLAPR10MB5044.namprd10.prod.outlook.com> x-ms-oob-tlc-oobclassifiers: OLM:2582; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mXsn+llO51FQu1/CJFTmzHeGwInL2eyeTjnt4mBab9IUwTThvxHDj+TdpqD0hPoMGd1a9qKoHKS/VzcaRVUJ7iDKwZl0QNh2p9UPhq7Yz1Ir26xSQktDbaOvgseyHl2ltpCxN6YGyyV93Lsagm1nB0INdpczsnxkOHKBuTMp5rucW+bhISd5+Wy84k9zKcLYxqx/oberX8lkyKhbICF9kckASVh/af2sis7EDARYDio5KazxI7E4Y7hAMBGFCNZoiKqb6nOhtTeFlWwSR0avRjqZlots4Cu7GgmM41VlWQdcafxv7r7Oe1htRc0K15FIF0NWcQscsjHKVJjgj7zNqnIWzFkYJ3EgurK3FR20mnM5YC5dM9SPq858H+CZgFNHZFZkCeNpzIio/uhuLFy38qG/ryYNh2pDgWSTlLZmgaDD7m3uViokxzB/t9LY5MwKPKxQA49E+m/MiA4Zt6m7anUdkFzkBE0YAvUkCx2BRY62OoEOsCERPQSiTP2UlriuGWHVPvwXx+RNQt4sWHykEMD8RiXwYxMtuzxrV6wYqvziUdG5lrVOVu+XXMgQI9DMZY9aTrFC3358DG8autPg7bVuOrrmoV59QDs+nFVKQj7IxuVGdP3HfhG/tXxI0Slu9H6Sxck9WOKV6jrfntWOpsccjurw+ST5MPjjD0U72uLhonYqAfFs1t1zwmHrRj5QtJS2SQf93XhjnFY9+1xBMg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL0PR10MB3011.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(110136005)(71200400001)(8676002)(86362001)(6666004)(6506007)(6512007)(4744005)(36756003)(316002)(8936002)(54906003)(2906002)(83380400001)(186003)(66446008)(122000001)(26005)(7416002)(6486002)(4326008)(508600001)(2616005)(66476007)(44832011)(38070700005)(76116006)(5660300002)(91956017)(64756008)(66556008)(66946007)(1076003)(38100700002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?sKQ7b2Sgsk1ETfMN+mDdd1e?= =?iso-8859-1?q?6is9eATRPVWkdQpCDeavD6QbVaWUOQldxq0J/npXTj9m9O3+KR92RVgcEXLW?= =?iso-8859-1?q?BQ+UXrnF02Of5j7hW480JEYSaEPLxAvXT3z05Jmp3ZZANj88JaXXjBcqhRjl?= =?iso-8859-1?q?Dyw0oowkgq6ahUiPsf/d4isSbXGA0wWfmPFEkCjUNjV1hsaLywdKY5jGfuh7?= =?iso-8859-1?q?P095IKB8ODwmPnch3lxWI51IHgROnPnxSPV39vawoQ22ZFbdDliTZK5cJ5bp?= =?iso-8859-1?q?E+dTAG4aPo53uerj80DTUg41R06vkdrW/u/o6/iXUdvr2VpzSSIV2lbETZeZ?= =?iso-8859-1?q?J+cVc28LhHVX3kPZau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xZA83i7k?= =?iso-8859-1?q?OEarf/b0UpJcWHLX0UTThJm6AxznZQwNefK/SkbOpb5+oMmJssEb9s3ri5Df?= =?iso-8859-1?q?R7nY2En/9t3SZt/4zdJenBbx/z7s65JDrLI090nmYplnA9H1FeEY+QHskZFB?= =?iso-8859-1?q?r?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BL0PR10MB3011.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8df020e4-35d2-4ff7-e9c8-08d9879fd818 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Oct 2021 01:31:04.8298 (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: KX7+GtCapxwSjCI3NdIiVommCqMnNUCAamgNc79Dpw+Txt5FV44PfO+xB/m4p3Yg9sxDUqZKrGWsF9VJS3lJ8Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR10MB5044 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10127 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 mlxlogscore=999 adultscore=0 bulkscore=0 suspectscore=0 malwarescore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110050007 X-Proofpoint-GUID: MqhmHKaH1j-c9_CwoMmf1hlKINSuR7HK X-Proofpoint-ORIG-GUID: MqhmHKaH1j-c9_CwoMmf1hlKINSuR7HK X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 5FCAFF0017EB X-Stat-Signature: awsazu6aocmishttjnhyx6uoerac6kmh Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2021-07-09 header.b=OJoLgA+n; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=jzvZ8JJj; dmarc=pass (policy=none) header.from=oracle.com; spf=none (imf16.hostedemail.com: domain of liam.howlett@oracle.com has no SPF policy when checking 205.220.177.32) smtp.mailfrom=liam.howlett@oracle.com X-HE-Tag: 1633401180-161866 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 |
Introducing the Maple Tree
|
expand
|
diff --git a/mm/gup.c b/mm/gup.c index 886d6148d3d0..f9710e475899 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -1568,7 +1568,6 @@ int __mm_populate(unsigned long start, unsigned long len, int ignore_errors) long ret = 0; end = start + len; - for (nstart = start; nstart < end; nstart = nend) { /* * We want to fault in pages for [nstart; end) address range. @@ -1577,10 +1576,10 @@ int __mm_populate(unsigned long start, unsigned long len, int ignore_errors) if (!locked) { locked = 1; mmap_read_lock(mm); - vma = find_vma(mm, nstart); + vma = find_vma_intersection(mm, start, end); } else if (nstart >= vma->vm_end) - vma = vma->vm_next; - if (!vma || vma->vm_start >= end) + vma = vma_next(mm, vma); + if (!vma) break; /* * Set [nstart; nend) to intersection of desired address