Message ID | 20220215144241.3812052-44-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 B7130C433F5 for <linux-mm@archiver.kernel.org>; Tue, 15 Feb 2022 14:44:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 08F9C6B00A8; Tue, 15 Feb 2022 09:44:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 016666B00AA; Tue, 15 Feb 2022 09:44:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D82866B00AB; Tue, 15 Feb 2022 09:44:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0200.hostedemail.com [216.40.44.200]) by kanga.kvack.org (Postfix) with ESMTP id C2FC36B00A8 for <linux-mm@kvack.org>; Tue, 15 Feb 2022 09:44:15 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 8EE878CE0F for <linux-mm@kvack.org>; Tue, 15 Feb 2022 14:44:15 +0000 (UTC) X-FDA: 79145284470.15.4386AFB Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf07.hostedemail.com (Postfix) with ESMTP id CC88740018 for <linux-mm@kvack.org>; Tue, 15 Feb 2022 14:44:14 +0000 (UTC) Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 21FEi6AX027424; Tue, 15 Feb 2022 14:44:13 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=z5GkGZxF/NMP0n8yPlIZA/7TqAWku/UUEWIq9kXgI8k=; b=DX1mW/Ry9kAieLBDp6GPqhkfSVXqFZN6wDfTYNUjSTdr5KMZwwP6YZdYmGNvHm+oVNNk BunnbXgP0sWft/zEM7+38xiiLkAOYcIChWCpoG8+bbiOhot9MV5OJA7BLYxfMuwjlOln 8IRRC24oFECxaOTdVU1rbwcA7cNohiucgbYYfivGo0rbYUfoPJj1IYqKDHsxprxTsW0m UY3OFtXO9VyPoKu7rU69oSpso4oW0K8mGLRBgOy3kmkyVFXOCe9gzxeZNRGFjvqWvmhB x2Z1WKL5e3ezpvUWBD4MN2wq19pZmpV4Vu3+vc4lxWlUn1iJfMWfEU03pSx4CQsyjcFj mw== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by mx0b-00069f02.pphosted.com with ESMTP id 3e820nhxxw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Feb 2022 14:44:10 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 21FEf96r016330; Tue, 15 Feb 2022 14:43:58 GMT Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam07lp2045.outbound.protection.outlook.com [104.47.56.45]) by userp3030.oracle.com with ESMTP id 3e620x7vhd-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Feb 2022 14:43:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VGppckxVPsG1T2D47ZeKRKtgCOunaIX6dXrOtZ6TGvxkiqBPnXb8nyqiO4GvUItZL3zJkYuGuff7qWtuqbMQppHP8M1X8JF9R7nUprKdWspIRwYQt0FwJHObOa0GF6h4DOXmgs8rA54iVsk/Dl8nmlb893TPSFFoDm+Zu51SF4rkHNqqa2xILVKeBx1OOFaPQWvZURuwERDLNLv7OP8s50aCVK4aNfZEAw4WPCXwirSfonFvSuWWiJFuMteN80eaKtY8jALg3errjawQOfTx89i6YJgM46oNOzT1cwCikc31mk89aIFEbFrWx2GSarJvypytE/KPDcJNbXBUo29Frg== 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=z5GkGZxF/NMP0n8yPlIZA/7TqAWku/UUEWIq9kXgI8k=; b=h3it3MrSKzBuecXFhN6uHmQ0NwnkIIoHuJz5EX4ts4TxKqhSDIGA3n/niu1IhGoBHBiG8XnejkM23mgG48E8QAC6U9QP9d45+DBjFo2+rZljWhph2tMZPfCWOQL94ra66/+UtVNiJEdSR/u9/k/xJN0o591jmJvDSSKKkkQgHCTJc29TADuvvCloCxMY2gxc3mpohgorCUGQDaAgxZPCrpBIAs4S14Itm7w5YrIo7UVfmP+j7csoVdnvkiYGIYYwH7g20bcNUIIspz8BQjYxpma/geGioe+SlOVnbBZXMUw04Hs6vNEXdRCehOUdRWhcXbk9KrQYQSqukgAM5qVhbQ== 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=z5GkGZxF/NMP0n8yPlIZA/7TqAWku/UUEWIq9kXgI8k=; b=pjuqWwWjTlKgynmXdCzs7sp2JrT5nizTkQNEk67Pg4PtIuHQqBzitwTdJEAviUIbat0eZS3wCU5kSqrLSVlJd1qbFfISFiwDjssa+6AOf6g2h5SNsc+BPy1iVhnNcQlP83UYIKrV1pV3yNQOyWUoG2/Pu1rmDVVVkdQnxXxUUiE= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by CO1PR10MB4689.namprd10.prod.outlook.com (2603:10b6:303:98::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.14; Tue, 15 Feb 2022 14:43:55 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::899e:951a:8129:8ef1]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::899e:951a:8129:8ef1%4]) with mapi id 15.20.4975.019; Tue, 15 Feb 2022 14:43: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 v6 44/71] fs/proc/base: Use maple tree iterators in place of linked list Thread-Topic: [PATCH v6 44/71] fs/proc/base: Use maple tree iterators in place of linked list Thread-Index: AQHYInpf/H1lFf7vp0SZPmX0P54tJw== Date: Tue, 15 Feb 2022 14:43:19 +0000 Message-ID: <20220215144241.3812052-44-Liam.Howlett@oracle.com> References: <20220215143728.3810954-1-Liam.Howlett@oracle.com> <20220215144241.3812052-1-Liam.Howlett@oracle.com> In-Reply-To: <20220215144241.3812052-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: 00991387-bdfb-46a7-3d9f-08d9f09197d5 x-ms-traffictypediagnostic: CO1PR10MB4689:EE_ x-microsoft-antispam-prvs: <CO1PR10MB4689B310A32794D6F9E6196BFD349@CO1PR10MB4689.namprd10.prod.outlook.com> x-ms-oob-tlc-oobclassifiers: OLM:1303; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Fhn3v9Vl9t1TOYjMhqkR9A0YYeelLaOEqsNQRne9rXfJpBPTGaj2xfJD90iPp3H7wtFQKynmVQGevUjTVkEJznwkPe76vqwqj0hkK2PZ3yv/QDuEfgN6Q6uf9lqLgDMbTcqvidw21jlK0fkjxtpR6uPJU47sF9MjZi76w6R1Tw5728NKxkCANK8oBMJQjzq+85XgZhfWQLulQaaQxUj2JD8dqiqdj1/apaH6bdG55PW6Wjji/r6gKcx56HUUDf+gS7O8gRw1JHg1ryMaQTiMnP/cNTo7xuK13xOqiqftaERhG1G5HzTQjV8+5wWVu/9AwUoFnH1uvdzFQ+i9RWd3zfOlBk4ih51qZKzF4kA/ljSCSuCH4bUyQZJZWify2fnI+ZZgUkvrL5ih9w4DZBnCqY6bd1FeX6oV4HA2t4r68gPIuaK/NJmQt5szISd65vQR0KAvdAl+oxvde6LPh+Tw/K/Jkes0vwqDq5ICmWf7P0HiC/WJutMXs99V2G8LGGnq6JZefjDrc17ncR4OpHh/Zc/iBtHLg3/30eFrMfxUqvmwFekhA8fhwXPqzqFrBG85HRMKeEmyd5YmMj5H0H/oFImvNc7ILB8XScH7HGnkPAzJsmhLY7Ml82ycwvWstFtnXM+InDBI6spBnmZn+/3eiiABm86TmesvI2xXD88iJoeo1BQeW+2r3eI5e9UWhg6rCU15Ohv0rn4EaoYbtRjAqg== 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)(66946007)(76116006)(66446008)(64756008)(66476007)(66556008)(91956017)(8676002)(6486002)(8936002)(86362001)(316002)(110136005)(38100700002)(122000001)(38070700005)(2616005)(6666004)(6512007)(44832011)(36756003)(4744005)(1076003)(26005)(186003)(2906002)(5660300002)(83380400001)(6506007)(71200400001)(508600001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?r+M51WdrAlQUmzIqgYZ14Y2?= =?iso-8859-1?q?yslfo0s91Wg4lAJYRSwHXRmRO7Ho2cVKD8iYYPHG66vuPGrsfu/TgmIMgGlN?= =?iso-8859-1?q?uyIgoOjU07I8t1PIcJR1vzwt7/kI6+aXsc+aAzdhuHTiiy6uQvupPlW+/0kQ?= =?iso-8859-1?q?Ll7JDWXjMXdXL4rHpeHREENjq/t/JLNv0O5GEMdwU+ChvCkEohhFelme0uAA?= =?iso-8859-1?q?+hJB84yxPkE0w9nkqIAmQX4ov6sJKk3LxazYMmiTYTmmIl5TS5EeOZoRY4x7?= =?iso-8859-1?q?thltoWlAHkENwg7Z5Tosiqs1CE2E4ELLEuAyZdy4z9Xk+RU+v5lh+w2/L+qq?= =?iso-8859-1?q?J6ZnopfdeT8SyauLc+w0K0mYAiRfgd/WLT0vWGVfnXx1XYXaO7JtDcfhBj1v?= =?iso-8859-1?q?kStEzfxMuBpmzRP44TcVOcSoEbDxI3fqcUFwOdnbDvNTWmvmKSd01xRDy1sY?= =?iso-8859-1?q?iPRGJRGxq6WHY7kJ3R2QcmrS5XR4N8kFkZGcLjg/vTjWLKRcIPOeAZqWjeDF?= =?iso-8859-1?q?/ILMkZ8BmImcFTS8tENwQ8gagb5zFLgkfaTSI1zeHreLHDJzot2Q1QQTuvHt?= =?iso-8859-1?q?0XRH0FoQTMig8dBiqblGgAWYEfluCyiFySHkGmqn64+FRzIblF4FHKpzEBeZ?= =?iso-8859-1?q?3/kheLorrFznDE5pwXW6SXKdVnaXc0V1U77G7slR24bn29K33jeecP028DMw?= =?iso-8859-1?q?z8Hae+L1vg4VtSXDxf/I1/Ggr03p/zJL/9MZiFNo/H9iMtBEHyA99wW9qJ5c?= =?iso-8859-1?q?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Q20Nnb8EGK9WVUPV7krBtXIQTk7iwwofE?= =?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: 00991387-bdfb-46a7-3d9f-08d9f09197d5 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Feb 2022 14:43:19.3856 (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: 79tPk46vuTarMojB92rdHNJ8ASoh54yJmNS03JupKuh2iM7skQjAxn2s3krP62v9hd6+0XJSS+uGadcBS74rQA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB4689 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10258 signatures=673431 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 spamscore=0 adultscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2202150085 X-Proofpoint-ORIG-GUID: uXSbR_W2Ivmuy7-lGgOfWW1X3224GNLg X-Proofpoint-GUID: uXSbR_W2Ivmuy7-lGgOfWW1X3224GNLg X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: CC88740018 X-Stat-Signature: khojhxag49ep6sjf6wepbn3wu7yzmnen X-Rspam-User: Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2021-07-09 header.b="DX1mW/Ry"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=pjuqWwWj; spf=none (imf07.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: 1644936254-298276 X-Bogosity: Ham, tests=bogofilter, spamicity=0.001425, 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/fs/proc/base.c b/fs/proc/base.c index d654ce7150fd..a62851782aa5 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -2323,6 +2323,7 @@ proc_map_files_readdir(struct file *file, struct dir_context *ctx) GENRADIX(struct map_files_info) fa; struct map_files_info *p; int ret; + MA_STATE(mas, NULL, 0, 0); genradix_init(&fa); @@ -2350,6 +2351,7 @@ proc_map_files_readdir(struct file *file, struct dir_context *ctx) } nr_files = 0; + mas.tree = &mm->mm_mt; /* * We need two passes here: @@ -2361,7 +2363,8 @@ proc_map_files_readdir(struct file *file, struct dir_context *ctx) * routine might require mmap_lock taken in might_fault(). */ - for (vma = mm->mmap, pos = 2; vma; vma = vma->vm_next) { + pos = 2; + mas_for_each(&mas, vma, ULONG_MAX) { if (!vma->vm_file) continue; if (++pos <= ctx->pos)