From patchwork Wed May 4 01:07:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liam R. Howlett" X-Patchwork-Id: 12836621 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 08EDDC433EF for ; Wed, 4 May 2022 01:07:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5D9148D0003; Tue, 3 May 2022 21:07:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 563096B0081; Tue, 3 May 2022 21:07:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 318ED8D0003; Tue, 3 May 2022 21:07:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 19EBD6B0080 for ; Tue, 3 May 2022 21:07:59 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id E568160201 for ; Wed, 4 May 2022 01:07:58 +0000 (UTC) X-FDA: 79426273836.15.3C6C5D2 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf02.hostedemail.com (Postfix) with ESMTP id 3076580087 for ; Wed, 4 May 2022 01:07:52 +0000 (UTC) Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 243KsJaY018676; Wed, 4 May 2022 01:07:57 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=8QKs2gSYzPPBgxZK5xrK7lu1dnVZ2IBu7Fw4Vk03jlo=; b=XPnueJezGLYy8eJ/GxE6AGWGflrk6LJWLEXE86j+lD7o2fmMGoC0LzA5qun1WblukZhG p61PdlLl/qYGTShQ+RC4AU7xJU0O1tAVHMpOzjT8ITGr4/DTESkt7jCflUX0UADJokBI FpiBJWgTfZPmebRYa/R4V881bG7tI3rinxdhbvEeYLCSAw0uajGVWguST7Hw4P6CVAWT EOEtTn7J7EwYtyqaoNfER/4oWWYYY+71siDbHnQ0PShZ1d2JAXoL+aGXA4JEX2MdUbot zhL1cuPFFdGhuGBEzqD998vG6ZHiK9XVoZgy2JJnpS9RVtHiFMQHwKDzmxqKQVDyZWdY 6Q== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3frwnt74av-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 04 May 2022 01:07:56 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 24416SvI039119; Wed, 4 May 2022 01:07:56 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2176.outbound.protection.outlook.com [104.47.55.176]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com with ESMTP id 3fruj2wdr3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 04 May 2022 01:07:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hfYYFfkMiVj1xckv4QcHSpGLYn1sQ2rI89w/LOJm+Kn7gsZkx/X2S5A7cMc0KL1EqiNGbVSMqwEtNj9MN0flwB9TsNIyWKT9fAaRUHdCiibrEiShuOAX1+41PlHfYTWesnbjPZUnsiWuZ5iIWM6yYqHmCLqQfY475XaBmZ5iOSIuPKpyBWCyjAFPPFNSBReWlej31/V2ZZCKNxOnoCZDTglRvt42W0ebpQqgCzNCkjPULxGHaKMSnke9xJxdcuc9niNwOUElVgubCVt4wyzxYHM/8odGAymlqIRySHTFiFfB+B2MCchmHZ8l0ACyH40YFGjp7If1Wkwi2V/OwktVkA== 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=8QKs2gSYzPPBgxZK5xrK7lu1dnVZ2IBu7Fw4Vk03jlo=; b=er4HznssWlpNZ491mVFGN34mJMlAECNy3ymM4tOJnEYYJQ9+0cnynI73lHyULU6UVJc6WCSy+rKfwAy6sTbcN9dZdMbj4TIjcUSne4vbY5pRkw4tSP/SKBKghvVHRFuPJKpLFQ0qGqo5Rodgenq4TKKIYDoz+c/S3EHbXXd6UNfuBfYFplyW5Px+7tt5+DJGNm4RlQeRixyd/D3Ccnawf8MQFAVryYaUUprdALT9A/6ddcb9JcLt7my7uC6vnxcV8RhcjUz9r15dgE8VNzxrFMrlaFchLzU28KA+l3KRZaBx1bb/MFXhn8e38qOPbmcN2cvTrRc95nvPsx7A0km1Gw== 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=8QKs2gSYzPPBgxZK5xrK7lu1dnVZ2IBu7Fw4Vk03jlo=; b=c1nmeBiALEn+NBFHQwSgbip/NfvEYQkJJES6FUya7g7Uqxu59YSnri36bSR8V6KrQw9sr+UOCir0Z3gNZnllIpUM1Te9x0ArRIVUnRvcR3LjzmCTcoaM+hpvNFeL8rCOoSN4k2U5RImYDYM+ScJW5yAchYG0rOkp4QorbatHuGE= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by CH2PR10MB4214.namprd10.prod.outlook.com (2603:10b6:610:a6::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.24; Wed, 4 May 2022 01:07:54 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::318c:d02:2280:c2c]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::318c:d02:2280:c2c%7]) with mapi id 15.20.5206.024; Wed, 4 May 2022 01:07:53 +0000 From: Liam Howlett To: "maple-tree@lists.infradead.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Andrew Morton Subject: [PATCH v9 09/69] mm: add VMA iterator Thread-Topic: [PATCH v9 09/69] mm: add VMA iterator Thread-Index: AQHYX1Nh9+xuVY+kykGmvwBuYAS2JA== Date: Wed, 4 May 2022 01:07:52 +0000 Message-ID: <20220504010716.661115-11-Liam.Howlett@oracle.com> References: <20220504010716.661115-1-Liam.Howlett@oracle.com> In-Reply-To: <20220504010716.661115-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.35.1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 21b494c9-6165-4d57-21dd-08da2d6a8483 x-ms-traffictypediagnostic: CH2PR10MB4214:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ie+4b1OJHtR92OLrWSjhRMgAplTNiEewTFswvnp7Lgcje0BTUhsP1KjvICQMMIc+sccyFneTNA9fnAm+d3gRkB+RZzLzPlxRMb5VsjgkX5uv7PNXSuPHBoagx6Nj1BffEuLhbWxC1wwMn7wXZLGIffFPQLGEzUkncQ/Q50996LZKp2TGlQJBZ7obVqv0m89f2OzGAqhfWgVPvNRmwteV8BfmmS/BlzUD8ZTU5jB3J74Bhqd+8RwitvOY92E8kiENzRpLOqYVPr5br1kksaHm6/P+kwHhgkt4fWzbmSHyEECHzwH6J1za99+tHNJNMeV57TThiTjOxI7S4UHHJhprouGwLeDWBGOUt1/eRjtjTrUykFPyUHVkf4VOAJAhFtG14SRrHq7BhiiG0VW+NbfJaQpzqJJvbFmeLmWvu1XcUw7h0tQZGCTCwDNrpaIKx0oSGQYYWR6VtuSEUp4crsIaiWtbZQlbtqvCdKMF1mO36EAZuBipdksMxDUN2haeSKo48IN0TMU1t6iLRQuZXQ0aoHfcn2afNk79AYq8v+7PnMvasxwCWH3uDJBafukETJym9hzxi0t1BV8xp5ItzkM29POOvkhyJ5eZVSXOJpvS3K0gH73z1ho3cBMbQ81fnb4LUEg0C/RUpDl6mxbFuu1Ze+Y4iI9ue483agwJPo8tvBaIB7fT9Y+SBOoM/WjJEADUCaOIoM7YlfP39ImRkcKckg== 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:(13230001)(366004)(66446008)(64756008)(66946007)(66556008)(66476007)(8676002)(76116006)(83380400001)(2616005)(110136005)(186003)(1076003)(316002)(6512007)(86362001)(26005)(2906002)(6506007)(71200400001)(36756003)(5660300002)(44832011)(38100700002)(508600001)(8936002)(38070700005)(122000001)(6486002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?SOc2DDju1Kt05JQl+Q8EqWM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M47WL930MdhuptlVd?= =?iso-8859-1?q?rRczlRCk=3D?= 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: 21b494c9-6165-4d57-21dd-08da2d6a8483 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 May 2022 01:07:52.6660 (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: touNDLrbreA1reNj1mF6Hwj8tjHZr9mUKg8iIw6NxIkhS7xi5jobUhnQSscAi9lEEAhjHCYM0lZfCiEuQVd5Lg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR10MB4214 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.486,18.0.858 definitions=2022-05-03_10:2022-05-02,2022-05-03 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 suspectscore=0 mlxlogscore=999 spamscore=0 bulkscore=0 mlxscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2205040005 X-Proofpoint-ORIG-GUID: FlbEeyBNCcCBwOQVlWWe9Xqjv9QNrOao X-Proofpoint-GUID: FlbEeyBNCcCBwOQVlWWe9Xqjv9QNrOao X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 3076580087 X-Stat-Signature: xy5nfd96iq776aoeq6k5deoqpg77u8nn Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2021-07-09 header.b=XPnueJez; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=c1nmeBiA; spf=none (imf02.hostedemail.com: domain of liam.howlett@oracle.com has no SPF policy when checking 205.220.165.32) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=none) header.from=oracle.com X-HE-Tag: 1651626472-905640 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: From: "Matthew Wilcox (Oracle)" This thin layer of abstraction over the maple tree state is for iterating over VMAs. You can go forwards, go backwards or ask where the iterator is. Rename the existing vma_next() to __vma_next() -- it will be removed by the end of this series. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Liam R. Howlett Acked-by: Vlastimil Babka --- include/linux/mm.h | 31 +++++++++++++++++++++++++++++++ include/linux/mm_types.h | 21 +++++++++++++++++++++ mm/mmap.c | 10 +++++----- 3 files changed, 57 insertions(+), 5 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index d42dc897a913..9d9b0d96433a 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -658,6 +658,37 @@ static inline bool vma_is_accessible(struct vm_area_struct *vma) return vma->vm_flags & VM_ACCESS_FLAGS; } +static inline +struct vm_area_struct *vma_find(struct vma_iterator *vmi, unsigned long max) +{ + return mas_find(&vmi->mas, max); +} + +static inline struct vm_area_struct *vma_next(struct vma_iterator *vmi) +{ + /* + * Uses vma_find() to get the first VMA when the iterator starts. + * Calling mas_next() could skip the first entry. + */ + return vma_find(vmi, ULONG_MAX); +} + +static inline struct vm_area_struct *vma_prev(struct vma_iterator *vmi) +{ + return mas_prev(&vmi->mas, 0); +} + +static inline unsigned long vma_iter_addr(struct vma_iterator *vmi) +{ + return vmi->mas.index; +} + +#define for_each_vma(vmi, vma) while ((vma = vma_next(&(vmi))) != NULL) + +/* The MM code likes to work with exclusive end addresses */ +#define for_each_vma_range(vmi, vma, end) \ + while ((vma = vma_find(&(vmi), (end) - 1)) != NULL) + #ifdef CONFIG_SHMEM /* * The vma_is_shmem is not inline because it is used only by slow diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 645715a4a89d..e3c7855fc622 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -691,6 +691,27 @@ static inline cpumask_t *mm_cpumask(struct mm_struct *mm) return (struct cpumask *)&mm->cpu_bitmap; } +struct vma_iterator { + struct ma_state mas; +}; + +#define VMA_ITERATOR(name, mm, addr) \ + struct vma_iterator name = { \ + .mas = { \ + .tree = &mm->mm_mt, \ + .index = addr, \ + .node = MAS_START, \ + }, \ + } + +static inline void vma_iter_init(struct vma_iterator *vmi, + struct mm_struct *mm, unsigned long addr) +{ + vmi->mas.tree = &mm->mm_mt; + vmi->mas.index = addr; + vmi->mas.node = MAS_START; +} + struct mmu_gather; extern void tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm); extern void tlb_gather_mmu_fullmm(struct mmu_gather *tlb, struct mm_struct *mm); diff --git a/mm/mmap.c b/mm/mmap.c index e777da0132f6..7e01bab46416 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -632,7 +632,7 @@ static int find_vma_links(struct mm_struct *mm, unsigned long addr, } /* - * vma_next() - Get the next VMA. + * __vma_next() - Get the next VMA. * @mm: The mm_struct. * @vma: The current vma. * @@ -640,7 +640,7 @@ static int find_vma_links(struct mm_struct *mm, unsigned long addr, * * Returns: The next VMA after @vma. */ -static inline struct vm_area_struct *vma_next(struct mm_struct *mm, +static inline struct vm_area_struct *__vma_next(struct mm_struct *mm, struct vm_area_struct *vma) { if (!vma) @@ -1333,7 +1333,7 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm, if (vm_flags & VM_SPECIAL) return NULL; - next = vma_next(mm, prev); + next = __vma_next(mm, prev); area = next; if (area && area->vm_end == end) /* cases 6, 7, 8 */ next = next->vm_next; @@ -2856,7 +2856,7 @@ static void unmap_region(struct mm_struct *mm, struct vm_area_struct *vma, struct vm_area_struct *prev, unsigned long start, unsigned long end) { - struct vm_area_struct *next = vma_next(mm, prev); + struct vm_area_struct *next = __vma_next(mm, prev); struct mmu_gather tlb; lru_add_drain(); @@ -3061,7 +3061,7 @@ int __do_munmap(struct mm_struct *mm, unsigned long start, size_t len, if (error) goto split_failed; } - vma = vma_next(mm, prev); + vma = __vma_next(mm, prev); if (unlikely(uf)) { /*