Message ID | 20220215144241.3812052-48-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 88E27C433F5 for <linux-mm@archiver.kernel.org>; Tue, 15 Feb 2022 14:44:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A2AF86B009F; Tue, 15 Feb 2022 09:44:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 963176B00A1; Tue, 15 Feb 2022 09:44:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 719F26B00A2; Tue, 15 Feb 2022 09:44:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by kanga.kvack.org (Postfix) with ESMTP id 62D216B009F for <linux-mm@kvack.org>; Tue, 15 Feb 2022 09:44:02 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 2B88821641 for <linux-mm@kvack.org>; Tue, 15 Feb 2022 14:44:02 +0000 (UTC) X-FDA: 79145283924.03.C46CF70 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf13.hostedemail.com (Postfix) with ESMTP id 8EE9620008 for <linux-mm@kvack.org>; Tue, 15 Feb 2022 14:44:01 +0000 (UTC) Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 21FEhhOD030895; Tue, 15 Feb 2022 14:44:01 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=rKZ/CLZXoDoQ0F3e5nAUn27R7xtiWxUWK31ya5rJ5N4=; b=vT45Sn7b3P4vB6vWiwd1ynvmZv7eIooSJ/ASwc12g73tUc8nrbDiAyYNooX9f59bx/6F mH3MEhzBjmdUFk7254EU/sJUTiPDYd7PC+HBDXCaexu4U7yYBH7Zj5o8bh1XRAu5Va1M nbqniUjVRIFC6Bdp9ADo9DxENVqasC2CD3Ch/C15LvcBm6BlXhR/7fTC3JtSj1Lov7nX 26mZT6QWfxvaVjqMeVLcFmiOomR/+6oI5vmzW762VhGhQ0zaShApbyHjT8c76kT6624r PYV9JJY57FWhiqWQ6p6srDTkqdkae6VYUryt47lVkSyLz//mnEEcXiUgYTJw4b+dsUsY jw== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 3e871psatv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Feb 2022 14:44:00 +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 21FEeT4P145723; Tue, 15 Feb 2022 14:44:00 GMT Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam08lp2042.outbound.protection.outlook.com [104.47.74.42]) by aserp3030.oracle.com with ESMTP id 3e62xeqfex-14 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Feb 2022 14:43:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TdcV4Pqwson1rkJ1W/05E/0ttPPD4PYOWNv+sXru6a6Fi8SX12APzpDdCaTKdDFEWnB63SdEEj65GU9+9idRkSzqFiPyENzfLn/UVRQmaaalHL/NvPkLE+zVbWGNXBJQ3wM85ok+BBgWR67Jpq5hZ//2I7M1H2XDKGooPzMp81OQ7unPdMEP0c9nhYrMFm+37D2t22fWwoICS4SBXX/onLaIjp95CXrEWS61B/fXXT0DeNtwH0H0G3cAHpUSF5+5KFvnmFKpe/YCImbt7vPGlFI/2JG2IQNt5jNbGmL525irM++Id8PcMzZ8uxABHR93rjpdujvtdiSoQc+raAH7Kw== 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=rKZ/CLZXoDoQ0F3e5nAUn27R7xtiWxUWK31ya5rJ5N4=; b=ZyW8IFs9CreTRG/0ZpYPCOGaXn8GQrKlAgcq0340GA7hjSzlqT8dLOfBEhPNSGltIUOWfZ8+BBAcmsia1UNA+zN2/OWfOyxKXGqvbay1x7fi0YVhsGS9djqJklwuUrRiRhkrDBkVSg5jCX4YWT1DBZc3zXZng2ey1/GNpWK4HVu7TPxsSSpErZJc9casuBxFzKYPwfYbEB+HrKaH/hyUi00IfrSrZy2yFLk7xtJDseYsgQTqhyMVtl47nGfOCVou1ss4AJReeoFhdT4BFHrCeJH4XtSQog2kYGIdxPFQwF5NBYK+gBeBC79JhWbjBHoiF6lX4o6EtS13sJL8ogsIhg== 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=rKZ/CLZXoDoQ0F3e5nAUn27R7xtiWxUWK31ya5rJ5N4=; b=GdboLHV7EIK9E3hm7ucBuBBqOz4eiorBR96mJpDSHo6mBKCihnnISLp2oNSkbZvSZqogc0cVoed9mDj4Gfez+syr3h8zDpY0mjAOkY9vzarryKVHx5rLaIKwpsCXpbYXJ7vhmu0OLM4lfiiG/rlLgM+bxTpg7EkjGdbB2R4tGQU= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by PH0PR10MB5578.namprd10.prod.outlook.com (2603:10b6:510:f1::16) 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:57 +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:57 +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 48/71] acct: Use VMA iterator instead of linked list Thread-Topic: [PATCH v6 48/71] acct: Use VMA iterator instead of linked list Thread-Index: AQHYInpgRITBAzEk6kaVNq/e8zg3ZA== Date: Tue, 15 Feb 2022 14:43:21 +0000 Message-ID: <20220215144241.3812052-48-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: 3d5e9c69-07f0-466b-54d8-08d9f09198d4 x-ms-traffictypediagnostic: PH0PR10MB5578:EE_ x-microsoft-antispam-prvs: <PH0PR10MB5578D6658C07C35214425293FD349@PH0PR10MB5578.namprd10.prod.outlook.com> x-ms-oob-tlc-oobclassifiers: OLM:3631; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: TiCR1BUuSlaBC7UpKDyjo/PKK+BcVpPz5Sv0LiI3It7QeJmE4LBdMtVXgL89rKKGmAznnEUuC0IKgLsXp+ZCPNq7SDz3ge5nenWtQCX8ZQozj8z5tdaJ5IqVUKF2/8IscLVO6uJBE3dCEuMEicN5f3wy00lurJcUWp6gYJyyu+AEsgJxV826LdH/V+jwrCsdLEazX0UnR1dmHozbMALFMCnZhky4NGsrCq+VvWDfP1FBe+FN/zAskhz2fG76YOUFzjeP11s3D399CR+vTyiBP6tKaByEfC4p5HbB3FA8zaELk1j7L59L1PKdqrJ+JZgKp2QjGDKuwowQ6gpNELoK4xyx5dZxxdLvR+1shLtv59Oq6za4EG2CG9pNIbGNkiV4PAUSp9w00M6HLTSvDxU+eDnlD3Hk3F4IGXqFP+i8gFaiwRH1+G5GZHyM80xKWEGPdQHSENWHLFV28/JQd913LFcJ+TuY9gWsIWMFuVRb8VCxGHMcvDf3YYvaFju4TdccJSIGGcqy9MbpNgwCoOYsbxorvq/fJoRDF807hO9qPyyofOnzspdZ/82V1j5HlMX/Ubz1wNdHhdkCmbaRiwhBEotC2Xs27XuAYiAgyGq9JYDgLfLn8mWtUI9VjnclIBQS/nxGq/M6QLKBYwppP2q5f6v512LR1Sqmd8pBF+uwqsrc9Dtpojakfqa9onu3MWk4KJTSKDy/eFo7dOt6qpEUlw== 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)(316002)(2906002)(6486002)(83380400001)(38100700002)(110136005)(508600001)(91956017)(64756008)(66556008)(66476007)(66446008)(5660300002)(66946007)(76116006)(8676002)(71200400001)(38070700005)(44832011)(86362001)(2616005)(1076003)(122000001)(6506007)(4744005)(186003)(6666004)(6512007)(26005)(8936002)(36756003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?n7D51IwT3wUQQHJ13pb1TBV?= =?iso-8859-1?q?/9DEmwew69Yhovau6eTQ6yS1R9QUbIMx146bAm+XlbD2UvldFzfGyDCgcBx0?= =?iso-8859-1?q?UM2grcuW075Js+FOL7hjVa/ePCefxtW4fL/JWknql5aoJszlChmWSqhHy9l0?= =?iso-8859-1?q?swah2RiZkjV+i4ZhN+5CjBues0HdL8H++4XHUG3JCdrQpKxMHOB/X6shCoJv?= =?iso-8859-1?q?9eomKHeXyJLfGd0Za0DhgsFVkh4YiFgp5n5JTtVO2HiXfyb8aMn2uTJvcqAg?= =?iso-8859-1?q?YTuXXGIkgERE0SNorIvZk2CtsugQDjkTLO2ZPHP0LzLCRS51SZYdWnV1Vb3d?= =?iso-8859-1?q?gRf8RCf73K/zFGIgNc4ZVsMvd53eEfdp0c5kR8IWBMkEOrR3I53t2Dli7zNF?= =?iso-8859-1?q?8OI64MATgNrMNswIplABCkIYBaiu1jZmbauH7aZ+fyp+8Rd8nD/08CadMy8B?= =?iso-8859-1?q?M4Att4gIQmd1EYiHKJSqo/uIfR0u24GuC4AhZ2/VJgukep6oCiv00hPNBVE/?= =?iso-8859-1?q?UhEKn6htvweJBmRzJk7D8CD3GH32UmmPx/Kc3RuXl6zr3qHmBqHRfYeHilRM?= =?iso-8859-1?q?x5safO+K+G8QGhHsu9QR+K5jNz6YKUCYkPNITWQfNWS2v56DN/2DV5sPtqZr?= =?iso-8859-1?q?Yjspdqs7serdS9JIq2Ko4kzRqFVaKZthyH3I4Puup/z80PqcdH1JBU9OXxGz?= =?iso-8859-1?q?1NEthtWZh12xnbRkJ8OaPLri1qxwP4EeOHqG+tC3jv+NAVwjucV8vjMy0mLz?= =?iso-8859-1?q?hqGj6ct2ME2RV7eVZhEBi7bUFY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q4UrvLtnI?= =?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: 3d5e9c69-07f0-466b-54d8-08d9f09198d4 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Feb 2022 14:43:21.1043 (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: 29ogDXyp2ArXUhcP9d2Iq3auip1EvWuKd8Hya17liXZxaHtYi0saW2J4Xtov45slcwyxk7QgalLogKyUQ6tTUQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB5578 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10258 signatures=673431 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 phishscore=0 bulkscore=0 malwarescore=0 adultscore=0 spamscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2202150085 X-Proofpoint-GUID: dZuWo_-_B0jI0nqGYLrfBTL0pE1lRAQJ X-Proofpoint-ORIG-GUID: dZuWo_-_B0jI0nqGYLrfBTL0pE1lRAQJ X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 8EE9620008 X-Stat-Signature: iqzj4m5kaw3yrbq87zgbyi4i4bo1wdnz X-Rspam-User: Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2021-07-09 header.b=vT45Sn7b; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=GdboLHV7; spf=none (imf13.hostedemail.com: domain of liam.howlett@oracle.com has no SPF policy when checking 205.220.177.32) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=none) header.from=oracle.com X-HE-Tag: 1644936241-391597 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/kernel/acct.c b/kernel/acct.c index 3df53cf1dcd5..2e7bf8d41f04 100644 --- a/kernel/acct.c +++ b/kernel/acct.c @@ -535,15 +535,14 @@ void acct_collect(long exitcode, int group_dead) unsigned long vsize = 0; if (group_dead && current->mm) { + struct mm_struct *mm = current->mm; + VMA_ITERATOR(vmi, mm, 0); struct vm_area_struct *vma; - mmap_read_lock(current->mm); - vma = current->mm->mmap; - while (vma) { + mmap_read_lock(mm); + for_each_vma(vmi, vma) vsize += vma->vm_end - vma->vm_start; - vma = vma->vm_next; - } - mmap_read_unlock(current->mm); + mmap_read_unlock(mm); } spin_lock_irq(¤t->sighand->siglock);