Message ID | 20220202024137.2516438-53-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 ECF47C433F5 for <linux-mm@archiver.kernel.org>; Wed, 2 Feb 2022 02:43:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 83BA28D00AF; Tue, 1 Feb 2022 21:43:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 633248D00C0; Tue, 1 Feb 2022 21:43:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3784A8D00AF; Tue, 1 Feb 2022 21:43:00 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0149.hostedemail.com [216.40.44.149]) by kanga.kvack.org (Postfix) with ESMTP id 1283C8D00BE for <linux-mm@kvack.org>; Tue, 1 Feb 2022 21:43:00 -0500 (EST) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id D0078829FD21 for <linux-mm@kvack.org>; Wed, 2 Feb 2022 02:42:59 +0000 (UTC) X-FDA: 79096292478.16.A632820 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf27.hostedemail.com (Postfix) with ESMTP id 34AC540002 for <linux-mm@kvack.org>; Wed, 2 Feb 2022 02:42:59 +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 2120HCjV011409; Wed, 2 Feb 2022 02:42:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=1iddMsrU7wXPcCSAkd63DcvwVjqMlZL8nSgrTfos8rg=; b=fTHrpbNoND/X3ihqLd84d086m1sx41rSoju+jWF6py+Uuql52rzWm7JLm9BSoR0VtiFK fQG3ZTuz7EIQvO1TVcilyplpqqK5P/QD4k1nCSx5xBBdM6xLT0GPXAmg89L9XlIDe7Yf XhlKyeywf3u85W3rUSc3sCZ4Hib6GsRwwnPJUnalqoRJj4FL3rpjogb/1BZnLl40KkOr WSO4AQ4gUlrmFMNIIAEHp5oOgmw6E8Tdrfqb/EdLa9kxaQxuxLn4Kdg4qHQWAPMriRFw QpaCAuhIcpeZcrgBjR5rLahXOypiSuKCMmB8s8jQfpVjbUiEhO/WsbV0QQa1G3zqrDKY Uw== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 3dxj9fvsej-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 02 Feb 2022 02:42:58 +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 2122ZvWj015147; Wed, 2 Feb 2022 02:42:57 GMT Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam07lp2045.outbound.protection.outlook.com [104.47.56.45]) by aserp3030.oracle.com with ESMTP id 3dvumgguct-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 02 Feb 2022 02:42:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=izxkFitV+UFfY+8t8/jINRrQ9gKbsqY42t5tgt3fsK12jz3cXdXIjb6XY7wLrbp4VhELT92LVEfRL+oz0q+IU7B/Hzl4xS4epPukgm+okUvSXHREWIvkVp8422KmXsA2L3AQNhIT7zbsEqYYXpjj7IAD0s726Er3C96S4vs0ne8T1Ve0BykpdZdwrQoaZffzAmBzhzCtZRXprH9XmxKsZLkDI4EZG1Wuo5K3MJSbvZb4FJ3kw1Lp+pKpvqwmwAoYd+y6ZBfQ+J6dcNogEHX8xyuoRm9x10IYdULInZWHCXjsmkEYrV9RcDR1fwCRR7MgPMpZamFB9/c0Cn2LpPAp6w== 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=1iddMsrU7wXPcCSAkd63DcvwVjqMlZL8nSgrTfos8rg=; b=keK5K+Z3l0x3YIRXkDZYVa78EjggNKuaB3oJHdLoVIDd3lW6RQ4Txn3Yx2aSdgecKoDg0OlwVTGg/cYeGqaQjgtKj40fbjqByA/vmMDOzV23K0tJueMOn51OJMa48udLXExA5WCxPd34yF9zxFfvyQ4+lLFMS03hJQEFW3OO5MNDhtj/68OspCaZIDcXctY1ZmfrBP2R7UqILZztNtoFZVWH7I382Z8H3YsSznPHh0USmUOo8g/pynNfCH9DB7FBnQlY3q9gmcOo8C0nCZ0No8HJcKsVWJIIeQ8EGNdP4JlQMZhIKJgOOC0OtycWRkNyLLNWD5CgyZaMarO3BICYdg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=1iddMsrU7wXPcCSAkd63DcvwVjqMlZL8nSgrTfos8rg=; b=v6KT96Z2wcNdWnL0rqxOTL9cUwLbUdHyW0Fr7ac1Yk6fy0nD2qwwtzkPPUqCD151Naa3HAktXCo2ZIn503ankYwpkhYkzKAeMKSzdUwTzPeHubDikmWySGwIiNCckEukAKpK4sT4o7awtrtwzeapwsJpYiW4fhTDxu78CVjzWvg= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by SA1PR10MB5865.namprd10.prod.outlook.com (2603:10b6:806:22b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.7; Wed, 2 Feb 2022 02:42:55 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::3857:3a25:3444:fdd3]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::3857:3a25:3444:fdd3%5]) with mapi id 15.20.4930.022; Wed, 2 Feb 2022 02:42:55 +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> Subject: [PATCH v5 52/70] mm/gup: Use maple tree navigation instead of linked list Thread-Topic: [PATCH v5 52/70] mm/gup: Use maple tree navigation instead of linked list Thread-Index: AQHYF95/MHtzE3FJJ0msN2B9gK4bEA== Date: Wed, 2 Feb 2022 02:42:19 +0000 Message-ID: <20220202024137.2516438-53-Liam.Howlett@oracle.com> References: <20220202024137.2516438-1-Liam.Howlett@oracle.com> In-Reply-To: <20220202024137.2516438-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.34.1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0ef30e45-7539-4375-19b6-08d9e5f5b759 x-ms-traffictypediagnostic: SA1PR10MB5865:EE_ x-microsoft-antispam-prvs: <SA1PR10MB5865AB55BB95CC6515FB6F32FD279@SA1PR10MB5865.namprd10.prod.outlook.com> x-ms-oob-tlc-oobclassifiers: OLM:5236; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: EYuHPjnB7QElRFTnRFo9pqYcRUwLN3EnTToKq6fZ9dBOyr8WgQkCU+sfjXQntHYTlPmlJWgaGaHmQjCYoUUikVWSBYlOjn61Zc93dS5qlz2RQHicSJL62FXWBkZe1i+fhDy/TD+sMsp0M31uYWNZPGaBywLnWucnpdKtuA9WXtmpSryaK4hvDsU3jM46AAzelrxjwZ0+IpniZrk5WYTtF9NmbXIQsSTUf2yfBDbpXeWYDXxjATHg9TziZK6mYgeLcIIrVTQuKfQgYooF9C/Gknejb3XCRjF9cS/baypsWrqv6sxefArm1g31ROZqZSQ8Oq5HtrQYzn4Wc+art/bGrNB0GL+c5Tl74y2kCR7RYYfkhABe0yfAVnMsuK9KRE5PWNYh1foU0D8i1yFRuRFrDU++S04LravfPR1ox5HBDwd2+zbSFuiabnbFixcvJLq7do2VUqs00CwtSKLhdpgwwRe3vTV273U+/Od+mQdMQ8hEd46OREj7y7l6ZzdCbOwckJ8NsFGr4VFCLeeGTcy+tf2EIXiELjNVyLUWgDRLtZ+rX7XnsEgG0KjH59qjZnk0XdLS4sAUMtnMN3h8/oO+5DYXI1M/ptwjGwv3T3CHTckZwKYJMGHqo6zrY2plD+AkULFpLyBrhZtiweiMeg0TIwhWGugciEb6ZaY16qnE3daRExBq+4RMDtKPUar+x5KK7WVVSkIQzXz+Sat0bAR5Qw== 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:(366004)(66476007)(5660300002)(36756003)(83380400001)(6666004)(508600001)(110136005)(186003)(6486002)(66446008)(26005)(316002)(38070700005)(64756008)(76116006)(66946007)(86362001)(4744005)(44832011)(8936002)(122000001)(1076003)(2906002)(91956017)(6506007)(2616005)(8676002)(71200400001)(6512007)(66556008)(38100700002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?b03tSsqqCdPMFUYW9pqwLo0?= =?iso-8859-1?q?N/zvaxw/aQum/mWqsEx9RTWqCG2U2Iuy78QNYNSYcPqzg/oKKbM8aaU1unRH?= =?iso-8859-1?q?V1U8J2TZgYSQKKSiq5Dsx56tMl06fz4tgFe8ODSOa6F+VyN3vM6wVmoBtp6x?= =?iso-8859-1?q?Q/fJrwmlSE6fF0ZRjzlZQNcIlzzN4ElEa9LLdcwQLF23zZ3rY+ywG4DoviX/?= =?iso-8859-1?q?FTfVHaqCUdhE1AT4jxFlJkR9Co1Pi5+6yB105QStmlfK2oAXap2eV8lmtI3R?= =?iso-8859-1?q?47isa8P4b/49yFD5c1xQpywAAnpZIKjR9B/bdsbICuw+C0WTuZMltV6ma4FJ?= =?iso-8859-1?q?qra5TAJ+XwFGZQbEkH1YKlDFVuozv79tcV6hFouInK2yPGTPiomQPWenrUIs?= =?iso-8859-1?q?a6P0TACHeeEMd9+BTNCzbi28kZPbEj0EDPYiFUHe8BGcESHKxrka+UCAyOcC?= =?iso-8859-1?q?M4NdudJwmL5sqgfKtX/iNUuXt+P4f4Szjc3ZezhmC4TSu17q9ce5EIPTyXm/?= =?iso-8859-1?q?Eo4kX8zlBXh0CrNzgsbr7vUXJB95pxd0SgVU7nTTQq1bBaPR/+nRZj4ZPkwm?= =?iso-8859-1?q?IFj56PiaDP/1aIxoEZVNMDtg9aBIkHoY/uFbuX/LWSp98Q4cdOfkvBseabGq?= =?iso-8859-1?q?wr9k3HaVKzXJ2aPatBpnJ6u7czA9mz58+HafAUm7LZox6zgB1AVrgFXa4UQQ?= =?iso-8859-1?q?yOrjFIoCjnnqoDrTZjOXYAQdADTvb06Uve13bHL+7dsBWvkQG0ruifNojup9?= =?iso-8859-1?q?CPhU1wr5ymFzHXbz3JQ1V1lBlon+ULMONXslBGP6Y1GEycFhHHb4SbgCEONB?= =?iso-8859-1?q?GiZudmPKaIfTbTB6583WsPuTHFX7ZmAva/lkg6G74YwtxzZud7HoXMhv4y1y?= =?iso-8859-1?q?8qkiDsHHd5aNUhSmfKj4+OVuIWFZ4SWMCuAKoz28pBvHXFOpTtK9zROKyrn2?= =?iso-8859-1?q?rzgcc3H3LdF/OCdu837VTVZIStuelJ84Pr8QaO/DRNlI89bFFJYoHwignfR7?= =?iso-8859-1?q?dzi6RESYwptVqAfoa2Qs9HmV88Mxycxtrm8Uo1UnoXFW5F71GbLdFuLpKYsx?= =?iso-8859-1?q?pQs4Tbnv1qpNuQAgwa9HRLsQO5BqCXD9SXe4Sn8H2S1+7zPK7evOAzG172gv?= =?iso-8859-1?q?cIosDur6ar+6x0flgCNG44NvqfMusdSqx8XMr+Inw0lMpwxDA4c5AERqPcwD?= =?iso-8859-1?q?zunezRTB52Z0utxihNNU1mjUpQIOlt1hyX2bLVrH+uiZe5ujjuRAICtQFDuX?= =?iso-8859-1?q?nZSaGtRmbdeKdB9Ct8uEBcid/37NnqOG3WdXXfClwkQ5gxATRyTOEYEwrulA?= =?iso-8859-1?q?ag9QPQ41gTDc4F/xSzDwCwaYLMAbxQ5By/iXTWhuCHx8f3o8CRtS69I19dpV?= =?iso-8859-1?q?tsC8frmvGZpu8Ak7CJnfqwmLjI8rRaJ6qEVRKV/B6PBJSK3GMPq3v84csRy/?= =?iso-8859-1?q?QKnpqYIx6fCWYGeVWr67SURACEFOvilOM+cKAVdUZkkvssQis+00fv0pjrfg?= =?iso-8859-1?q?MVBSMBabNiSwjzr71XUFxTw5n+TmrJRzPKsZ/PbvQY0d0b9blzUSERF967BH?= =?iso-8859-1?q?xy85CI1ZpA5KjDYxUOl+mXpHydgOZpakoSfANtCw+r3ts8dHgpens6h9iTof?= =?iso-8859-1?q?jILtm1qSqvLIQq3XDA7WQ48xgAramFH7PEdT58hOLyi0CmQ5BL50CT2bpZwQ?= =?iso-8859-1?q?=3D?= 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: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0ef30e45-7539-4375-19b6-08d9e5f5b759 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Feb 2022 02:42:19.8446 (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: nFK4r6NAxp5LHvK73CbQ2i5NcmTA9Orxy74bP6EwrNr8NoeSOYvlqBt1RqYq1dcRyK14cMThc6cde/CMnnpdBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR10MB5865 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10245 signatures=673430 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 malwarescore=0 phishscore=0 mlxscore=0 adultscore=0 suspectscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2202020010 X-Proofpoint-GUID: atHdqDW5DHIU7Ch-uXxQ90ln_9N-idA8 X-Proofpoint-ORIG-GUID: atHdqDW5DHIU7Ch-uXxQ90ln_9N-idA8 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 34AC540002 X-Stat-Signature: rkxis9fo1p6khguuq4qruwqrqfjmn56h Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2021-07-09 header.b=fTHrpbNo; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=v6KT96Z2; dmarc=pass (policy=none) header.from=oracle.com; spf=none (imf27.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-Rspam-User: nil X-HE-Tag: 1643769779-20122 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000028, 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 f0af462ac1e2..0fef70bc6736 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -1584,10 +1584,11 @@ 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, nstart, end); } else if (nstart >= vma->vm_end) - vma = vma->vm_next; - if (!vma || vma->vm_start >= end) + vma = find_vma_intersection(mm, vma->vm_end, end); + + if (!vma) break; /* * Set [nstart; nend) to intersection of desired address