Message ID | 20211005012959.1110504-30-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 DC60EC433F5 for <linux-mm@archiver.kernel.org>; Tue, 5 Oct 2021 01:31:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8480761409 for <linux-mm@archiver.kernel.org>; Tue, 5 Oct 2021 01:31:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8480761409 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 EAA17940015; Mon, 4 Oct 2021 21:31:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E30AE94000A; Mon, 4 Oct 2021 21:31:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CFA54940015; Mon, 4 Oct 2021 21:31:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0111.hostedemail.com [216.40.44.111]) by kanga.kvack.org (Postfix) with ESMTP id BD97494000A for <linux-mm@kvack.org>; Mon, 4 Oct 2021 21:31:30 -0400 (EDT) Received: from smtpin33.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 6C80B32075 for <linux-mm@kvack.org>; Tue, 5 Oct 2021 01:31:30 +0000 (UTC) X-FDA: 78660656340.33.31C06B7 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf11.hostedemail.com (Postfix) with ESMTP id D6F9AF002429 for <linux-mm@kvack.org>; Tue, 5 Oct 2021 01:31:29 +0000 (UTC) Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1951BZjC010255; Tue, 5 Oct 2021 01:31:23 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=WHjAZi4EVBUvdMxrcFaiiwl23L4DVXsDdqob1VzA6R4=; b=Jdf/FUg7VeaZEBvyesOE6vHvrzWoS3v8ltjck6sRgUIkysgugwSZFlUCllhyeh3X1vbK KZqRgAYxiBPzTqFSMv6JRZVruron1XMGaQqC1huZwmKZQu3JPkSgr8LJyijkGe9Xd1mW oYdC5nXWqsk5YEWMW5ywugv+BPQ2JaAWTUL/+TXboDEON6gSo4mxzpG2uL4BTK0x22V+ d/XBFTlH88t976loo0e1N4CGKsQhOEq9Ded8qXS1SfAQ+rwPoMpgyj4WPZOiyTX5HxD3 piDQVFAJfaVyHak4hSPnnZwC6JGtIUqVjVSYV9VGA6pBIVfDxgtTSrAy1LXCgrfZ8APR NA== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3bg3upv392-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Oct 2021 01:31:21 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1951UdGC141646; Tue, 5 Oct 2021 01:30:52 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2173.outbound.protection.outlook.com [104.47.58.173]) by userp3020.oracle.com with ESMTP id 3bf16s9duq-15 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Oct 2021 01:30:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aSivPsSgGH5VD746mvD1rlH7UuxozzCPcAeN6w08CwfP9Ubej3yH1HErvpTDro63aKxZnHczMcMSmsK4Y+QJnu2vKfXSybOY5nUvmYgVEA/uynVVdry8F37Ea9esM+2/YCn4iEK+2+mNAG2HELbMqBA81XkyS25hlcsGqNkLVmlmv/7HyTEGgRAmVhDwktrjECEbHyQ3PqWrN95oaTOekp6gW7gUCIVC5Nw/EXUOwABMz7o3a3FtuPDjEXUiLLrpSubaOF0DfsA6fjuuVS+F8vwjGtoZ8PZWVSNeCxoTZS9BovolzkvhdorvCz0Ing2NzVNGMroMAKvt6K5Y/DupAg== 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=WHjAZi4EVBUvdMxrcFaiiwl23L4DVXsDdqob1VzA6R4=; b=QtyyWpzz4WwNs2ClH/6BZp5gYgpZ5S7JbRF+hf0ipBdvXrVXSp+T3Y8JVwyBym/pgikvfq6GlsRoFjAnKv4AGyaDq8j3hNxjQJK6fFDJySUlMYtVxkVDNJnyzHMyPFewBab5QaeEHPBKLQokkYy0y8Puc2Dzvdn1ugTnM0KL3JfTqXjtQYe1uPSCpnO3Ws1MlW76PYVJkLDsaCZxTGUX1nyENnm0mlXFb+Hc7kSw1XhsDhCI3nZWKiIroS54k4qLIjfT8TKCSkwiBMBiiMNpwdFYVO48pJp32bEMwA9oPnhzs6kHuf7Mrc/FuiDIJJDmFCCGxMj0qP+n+hvKFPp+xg== 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=WHjAZi4EVBUvdMxrcFaiiwl23L4DVXsDdqob1VzA6R4=; b=rHjJV51Sum0mdIsHQFyRC133autyRZ5hv9nnxVo9bp9URqGwdQr/KSGhZzYP3rv1SyN1GW3Sxh9t1k+gNMiQhqIQfHDcpkBq68X2M72G7c4uSHkapoRHbTPmu6QUEoxkDNQpDi42NcbOoK6X21jnwfCvc0NxuoUMYS6CkUyZbNM= 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:30:49 +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:30:49 +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 29/66] arch/s390: Use maple tree iterators instead of linked list. Thread-Topic: [PATCH v3 29/66] arch/s390: Use maple tree iterators instead of linked list. Thread-Index: AQHXuYigo1AlosNw5UeuJ98W6cXpoQ== Date: Tue, 5 Oct 2021 01:30:48 +0000 Message-ID: <20211005012959.1110504-30-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: c055a913-b02a-450d-bf14-08d9879fc386 x-ms-traffictypediagnostic: BLAPR10MB5044: x-microsoft-antispam-prvs: <BLAPR10MB5044CC88D2E752479CE26E43FDAF9@BLAPR10MB5044.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: TT9hZASySIEH8nGpdnKTmd+f6FEm/3019zAOsdLUzdOpkxHFCkOvbnXn0RKdVkge/WcoRL9685d6ISXHBWw55Xk+BPhrf+SuK44hrLokzdaeinCChoQZF6+bN6E8sh5dpXA9J/zmhY3VcxVHeEaQXxwrXPqxCfK3Mj2CVhtTr5errgZxjs26Xx53GoSuFQlDOgY346KsvaDDT+YrUs4JzYN33z0Z8w5odRcnEDfQbCVeVUBoikhrdEWeOYdpWzl+84RoYXk8GHG2T0zcPVSXdg7dMr0n0cy9NoJvM7VjUK6QvUZJX/4rV23X0k55Wsi1bO2o19HatBuzQLblhIJK2EgAUjQ9WcfY0ieYHqMtIWVGxYkPTDY5CJLf/x4q6zvcElWEJYUuiRLUTE2iPPp8pV0zkbs2ms0bgM66B7ZbwtlC4V0RnLH6pYjeyMRBVA22n4wE+3lFRqhHHwsLjefQXYlqTqMbvfKi62nmLmBbGqD6wo8oljJfvPv1rZcrd9zIIt/X9w27sr3SZsU48CMRaVK7j7vJGDcJJEuWBLPOB5IRs8OXTlAJL0rjTbzib0MvM78voICk6MHWhMnKOvPHALnf0CGzeOQyeIRuN8QlMkcW8/lXie4sH9r7lem83zUiJTwFilop0m0K5bMRzK17o2rN2aQ4tH6xwuXgv8PzB0hHnLoxAGY/od6zLTdUKYVUZKjADlg4kYHUgp67WyX4BA== 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)(6486002)(66446008)(122000001)(26005)(7416002)(2616005)(4326008)(508600001)(1076003)(38100700002)(91956017)(64756008)(66556008)(66946007)(5660300002)(66476007)(44832011)(38070700005)(76116006)(86362001)(110136005)(8676002)(71200400001)(316002)(8936002)(54906003)(2906002)(83380400001)(186003)(6512007)(6506007)(36756003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?zsqUgZ0FJMLf/Ge8qOJ05bG?= =?iso-8859-1?q?eNeXS0w4ZoyWCY3nlWuQy4imcRH2/jkPnf6Yx5QZRMVnRa+i2mEnC62Atzxi?= =?iso-8859-1?q?kROG6bla41OV80d4Sq7oNMCTSNskLKw8uwetZo37VXF4gGJD5TmK3N+Wo7Qx?= =?iso-8859-1?q?vv9AxV8GlML9bMzWfNJRC4BvbTq8RZYxvHlzU6aT5eqwB3wdLDw1MZlRITuu?= =?iso-8859-1?q?/1G/ZuBs6SDUfR1SEe9O6gHnuGmxESluWajXfDvfBCu/+KMsyJakfoCw/Qu4?= =?iso-8859-1?q?iZRmoG6kQWZGYceMckla9ksovH/BqAgQttA+zRPVespTSNUMS1EdZYh6C9Er?= =?iso-8859-1?q?6wZ7uKaLT5piLuZPmPuD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3vBrLWkSgtTd/4tuGQi6cWm?= =?iso-8859-1?q?5RDXf04Cu+Er/fUPYE4MbmQL9sNdlbEHy9nomCMpqJBh4K7Set7kqvYR89gr?= =?iso-8859-1?q?+aVc4WVyruU18QFEyNqHP5olxb1Zw7/ZeFt69c7QQyxQ3s5o+wwy64L1VKBF?= =?iso-8859-1?q?H?= 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: c055a913-b02a-450d-bf14-08d9879fc386 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Oct 2021 01:30:48.9199 (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: VO5402ht8P8FBmS4A8gez1NJGfwaWJUfp0qAMVJ33kTSdjN12wR/Pb06KIrXXAjXKjbvbqYU1w0taD7giOOGuA== 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 suspectscore=0 adultscore=0 phishscore=0 malwarescore=0 bulkscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110050007 X-Proofpoint-ORIG-GUID: phLb1XdYSm9vsrcqRogA1ehJlal72fqY X-Proofpoint-GUID: phLb1XdYSm9vsrcqRogA1ehJlal72fqY X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: D6F9AF002429 X-Stat-Signature: wsmi5ca8pareni5enk78zyy94g4aeqrq Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2021-07-09 header.b="Jdf/FUg7"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=rHjJV51S; spf=none (imf11.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: 1633397489-635821 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/arch/s390/mm/gmap.c b/arch/s390/mm/gmap.c index 4d3b33ce81c6..fdf7f1d17549 100644 --- a/arch/s390/mm/gmap.c +++ b/arch/s390/mm/gmap.c @@ -2501,8 +2501,10 @@ static const struct mm_walk_ops thp_split_walk_ops = { static inline void thp_split_mm(struct mm_struct *mm) { struct vm_area_struct *vma; + MA_STATE(mas, &mm->mm_mt, 0, 0); - for (vma = mm->mmap; vma != NULL; vma = vma->vm_next) { + /* Must hold mm_mt lock already */ + mas_for_each(&mas, vma, ULONG_MAX) { vma->vm_flags &= ~VM_HUGEPAGE; vma->vm_flags |= VM_NOHUGEPAGE; walk_page_vma(vma, &thp_split_walk_ops, NULL); @@ -2570,8 +2572,10 @@ int gmap_mark_unmergeable(void) struct mm_struct *mm = current->mm; struct vm_area_struct *vma; int ret; + MA_STATE(mas, &mm->mm_mt, 0, 0); - for (vma = mm->mmap; vma; vma = vma->vm_next) { + /* Must hold mm_mt lock already */ + mas_for_each(&mas, vma, ULONG_MAX) { ret = ksm_madvise(vma, vma->vm_start, vma->vm_end, MADV_UNMERGEABLE, &vma->vm_flags); if (ret)