Message ID | 20210817154651.1570984-26-Liam.Howlett@oracle.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=Mz2w=NI=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 X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F79FC4338F for <linux-mm@archiver.kernel.org>; Tue, 17 Aug 2021 15:48:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3890860FD9 for <linux-mm@archiver.kernel.org>; Tue, 17 Aug 2021 15:48:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3890860FD9 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 06F166B0089; Tue, 17 Aug 2021 11:47:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 01F086B008A; Tue, 17 Aug 2021 11:47:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DB46F6B008C; Tue, 17 Aug 2021 11:47:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0075.hostedemail.com [216.40.44.75]) by kanga.kvack.org (Postfix) with ESMTP id B9ADA6B0089 for <linux-mm@kvack.org>; Tue, 17 Aug 2021 11:47:39 -0400 (EDT) Received: from smtpin37.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 708848249980 for <linux-mm@kvack.org>; Tue, 17 Aug 2021 15:47:39 +0000 (UTC) X-FDA: 78485002638.37.AE2392E Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf12.hostedemail.com (Postfix) with ESMTP id F3BA210003C9 for <linux-mm@kvack.org>; Tue, 17 Aug 2021 15:47:38 +0000 (UTC) Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17HFkF7D022508; Tue, 17 Aug 2021 15:47: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=Jbw5atURRhyIIzaH+ltrvXt3bxGqwb4c9lv39LgYV/k=; b=mYr6QDh7Y+hDL1hooaIosgk/LgYs7gokd05R9L3xW2hvHAUXx2yCe/9VVO+ShTmnENFZ hbCSOgoulh3O6vQzSmbh5LC3dOd6n3YW7fY3qwiguuiCMEDhk8XDu53xaWx02HuHxw+6 E8cawssQ4F7X2K8dNfN1zURj4XmR8YJz+gfYzxtYSlOFg4fOiR++UEKGU7SYCQ4+0h1K jVcGmhYe6y16eVttuTHndEyiSUGDGv/w9BI01HZoKbGP/I221YvJNbX7wK0XiN+LLaPs 91Y0T8Om6LMJeuG2Wcph84Y1AdCJw2aWjHFfTdSlTBMz6kO5ZmoJlFtknARgEZtGfYGw 6Q== 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-2020-01-29; bh=Jbw5atURRhyIIzaH+ltrvXt3bxGqwb4c9lv39LgYV/k=; b=YjqejzU49UbT1cOTm4xToN60ZgAn+lzpUr4Dw31ZNl7/F91w6TfsH2fDFy2bN3VdGHtk hmfGMSIIK6AJZnVfE6KJ9ERT7B+L0A4j/+jpKtUq57w2s+0xdtPpw3RIkc/WwhynwPGv 1G3FD0EcnXk+mxrEbSRK0dMAnGUNjfRKbXPwpHusjyuMZ/a1sKDQCWJuzx6k2mGrve04 Lkq9cBu4G0ujvNfkTKkR/QkqqbPaLOw87bUxm8s7+PR8Ozb2rekb2XTUXh2y6rSVkhbE ojs7HbGcFe3mgKgHK6En5MfCJqPFq+dHMZvn85mRUXi0Q/LtUoXjcbkzGvyQaZ1H7c/5 og== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 3afgpgm8y8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 17 Aug 2021 15:47:22 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 17HFksAl094402; Tue, 17 Aug 2021 15:47:22 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2044.outbound.protection.outlook.com [104.47.66.44]) by aserp3030.oracle.com with ESMTP id 3ae3vftdbk-5 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 17 Aug 2021 15:47:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oMnzojHe+nSmE8IZkP+FJmBh6l+eluS+VKubNZ3lzhOdOxj0CmXOw+yAhSModNcn7ddm1nDyDdKPq3fYgsbjEC5boUvaDkEup8Sf1XG1s3b16+60dyeU8fq1RWOOvRHCbh/BTY/aF+PmRfeFDdSfr6Pru0XQBRW7iObRvQyAi2xiJgCFXhJ5UyiOpDAOcDbyGK0sZCCJCSRJXXLUqKHQ4gOe6DBX7hrf4NmiHsTTje7R7npzJ5WQQpEy5I/wqc40yNWVZNIwusH32cIcfeMN+E2LXeyg+m4afLnkf+464pYU998BBMXCODIlbgBipBYpCWFTPyZaTwJwRVfA4lxywQ== 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-SenderADCheck; bh=Jbw5atURRhyIIzaH+ltrvXt3bxGqwb4c9lv39LgYV/k=; b=Z0lbW+b0qdTu+jUSypRbzV9YXXHK/WqH1o3IC5Uf6EZPQwkdVaZYpDhoxZC7NX9ac6Sduv4vgFKsfmz3/tEokcBKkDagTF9dO4yl0mtMByPawpxORAU2oO+XzUTq+4HE3H8yaflrx74u+7TMB3a82cMmlZXwKRNyMC71HWOfrU9VZYFL+vkPaioXxG9zUlvBDAfhak7TvQdThirqXQE0XlTA4o3bRzQs920sf2Pq8iqcHdhZjlbstYV38Reop/wT2qoz1NraFmksrkaLGpYAjlnvDMJzhp5RGB3lykgDt/7S/EnRTOPlBblJODxV7wvYjEcy6u/ajzz84nwk5VefzQ== 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=Jbw5atURRhyIIzaH+ltrvXt3bxGqwb4c9lv39LgYV/k=; b=QUcaqXfDmVJKad619Qnb/zYEPVU63rxypnOVx+2xNEJC4ANfevkQmlHpcQ+f+VfuXd7XiP1LTEfeoUq0eiyNOcLy1i8NVuH2QTZodnYV5qVnE0z/k1nUWRa6Lms3wAGoXWyqkJ7xB05p+aj9q+Z1jRA0Cpew510A6x97aBycbYI= Received: from DM6PR10MB4380.namprd10.prod.outlook.com (2603:10b6:5:223::19) by DM6PR10MB4236.namprd10.prod.outlook.com (2603:10b6:5:212::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.17; Tue, 17 Aug 2021 15:47:19 +0000 Received: from DM6PR10MB4380.namprd10.prod.outlook.com ([fe80::585:1aa0:6582:92f3]) by DM6PR10MB4380.namprd10.prod.outlook.com ([fe80::585:1aa0:6582:92f3%6]) with mapi id 15.20.4415.024; Tue, 17 Aug 2021 15:47:19 +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> CC: Song Liu <songliubraving@fb.com>, Davidlohr Bueso <dave@stgolabs.net>, "Paul E . McKenney" <paulmck@kernel.org>, Matthew Wilcox <willy@infradead.org>, Laurent Dufour <ldufour@linux.ibm.com>, 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>, Michel Lespinasse <walken.cr@gmail.com>, Liam Howlett <liam.howlett@oracle.com> Subject: [PATCH v2 25/61] arch/parisc: Remove mmap linked list from kernel/cache Thread-Topic: [PATCH v2 25/61] arch/parisc: Remove mmap linked list from kernel/cache Thread-Index: AQHXk38pjg5uMQOJb0GgZgwCLo6NfQ== Date: Tue, 17 Aug 2021 15:47:19 +0000 Message-ID: <20210817154651.1570984-26-Liam.Howlett@oracle.com> References: <20210817154651.1570984-1-Liam.Howlett@oracle.com> In-Reply-To: <20210817154651.1570984-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: ad83e384-2778-4cc3-e41f-08d961964c04 x-ms-traffictypediagnostic: DM6PR10MB4236: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: <DM6PR10MB4236CC6F2A3A110A63CC5F3FFDFE9@DM6PR10MB4236.namprd10.prod.outlook.com> x-ms-oob-tlc-oobclassifiers: OLM:4125; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jnq+mj+aXrxs/aTVMgZzz+ggaNh5wBqeelwbuorBPUjyAuGx39CKohfbSan12lZVrRw433u4UPIElq7RpRz87V4LSj8kvL51g5YRhxj6MFRf+2EtnrpAVyBOBjSbpi2+RqiuzjfV7Rcx8vzg+a2eV1xkECSXgodvRxk9YFsdpH+D+7xw4RhyW5fRhhNjhvO6UHhZyFOrwBqvoW1P7faNYB/LO0nGdWPs4FANljwBRfCBUkMdYo2GHWNFG2z2r65wqpQxbd0FkSFJnOdUAIfsJPEA1BJZz1AU+pW2FbsSYFWSVOldugy0J3cjwWsH8cMBIbj0aca+GzkPIU1vogRyEa+Ce+QrXjddRS1iqcp5GY27BRZWeayCIMQLrd67POq59V8aaK5buXTBW64NxwZwONt3VmtOy5jLLESKMfGwT5T2ikypShTL77rcuP9DVelq/ryii4NFcYLXYNWq9og+ShdPv3c8vG7rjTTE8tgtpNSWWUgt4/Ro2X0WbrvP0xvtbZ6R/R5Tzu1xpCwRLuUFkME8pdRK/Z2ZoMQkkf3XEXGACJ/oyz6NS4VZi9iqCObQSWa2JG4iHW8Dlc6xToBo0hTeKpErtVKPtFHyamT9CAvkGcyrBA6fRXd+GsSmF/dFjQ3A6+ehIiBS5VGQoi3T+Kmmid/ehdS9o7dAn3aAyYsN9dFoM0kYNX9t77vgyMAPkaYTBsFkpixG5xoaA8EOWA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR10MB4380.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(136003)(396003)(366004)(376002)(346002)(39860400002)(54906003)(110136005)(1076003)(5660300002)(38070700005)(6486002)(36756003)(38100700002)(478600001)(83380400001)(2616005)(4326008)(91956017)(76116006)(6512007)(122000001)(316002)(44832011)(6506007)(66946007)(2906002)(7416002)(107886003)(66446008)(66556008)(86362001)(64756008)(66476007)(8676002)(26005)(71200400001)(8936002)(186003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?BbYLVLbAYHBEMSrD659uncd?= =?iso-8859-1?q?+QsiXGn7t0crzjA291/sBO05UqOibYd+AcyjxFG+HwY1EGBuHTtcct4FCvhW?= =?iso-8859-1?q?wNpTuWx5OvDJvxnYDSq5O8QhldtjdTWjw+cjHNuWB2Mtn4lnCmzINw9F7QdG?= =?iso-8859-1?q?ZJFMGZclCl3ALfqhM5eUbyiLCTWAhZaaqZUN2x/3WJyng6kqmk7UWgSLkwt/?= =?iso-8859-1?q?J8i5Kgy2gy2SdltnJD5dnVa2bkF46OY2qXfEZJ+GVnBcnbvQCcvR2hNZjXHs?= =?iso-8859-1?q?u4S8yA98Xqu4HWyHaNLf1YlXL9+aDyaW5XT7sy8tSmB5Z6DLPhu3metZhLkX?= =?iso-8859-1?q?fsEJOxsVJFJb1a9v7DzItrBgy5g1oBqOpwSMA2cp0aRbeXQuifwI4fMc9aUG?= =?iso-8859-1?q?LJOc3dKIM9ca9PqxmmOoO65q1g9KtrWPa54J6+swvAFWNqg1BlAY9d11cpEc?= =?iso-8859-1?q?dC29i97qPOEf5Hqa+mhhzmj9CTDr23wvT90LwmqLHcfuCu6f0pU07Xor6QMx?= =?iso-8859-1?q?GRr2a//8pJTZr1F31s8kNs5rsC9N2MyzFgcJiAJs32KrpdpmNaom8QPJtuAs?= =?iso-8859-1?q?UXGrQ/g5spRBLUGzQXil6avYygFGI5sXEqHu6LaVflrV402htTxFLEqCt/87?= =?iso-8859-1?q?fgts7FtVRx0QEK03b3zPkp/bx4IwlmvzGIccrALTWdRvQrDQ1qlMEP+nfdt0?= =?iso-8859-1?q?80Hgx7sDsK9F2KQ136hbbN4EYjI0bxuzxR4mfsZCDNuPOZPhpcHG/g5+pkgf?= =?iso-8859-1?q?hM7KgJdQNtCVh4s5ITO+f0HmY9YGh+9EDTGsqpfvUzcI+6sAQlXEZrdFB2Ab?= =?iso-8859-1?q?PlTAlAOoizh3rGMF8T0BLOMi8JCs/P6zAojre6sGih9PiFsbKt81/WoB0K9j?= =?iso-8859-1?q?0k8yxhGDUYnOMb/N7bsEdZU8EW5GHS71ODOPmv7yx9CG0KNifBlnQAZvRZ6e?= =?iso-8859-1?q?YDHL3SLiA267I7zd2BW8fpga1PBGqwk8pY+kwsexe+zKrDvpbg206ZSH5SnU?= =?iso-8859-1?q?kEzLQ1evxgN9hTPUM4XOD8uQZCczHWlA+mB2DNcUP8DrmRcjQuaz4IMcqq+h?= =?iso-8859-1?q?XDvHQYd+2s/38T3yBKE2hklnLlXBuXym8pNEpXoLLp74mLo3kpRGGsB2SLuS?= =?iso-8859-1?q?pG2JfEG2twDMx+0Ee0Xn9IMnUuRM996WOEqd2P28ErIqWHcX8B4rO5e4p5La?= =?iso-8859-1?q?8iUuUn/Lb6BpPkzeIf2hVainjcS843XK9m1D6xDu8Trrq+JHmYO0pdC43mKz?= =?iso-8859-1?q?DYEsuPwLWkUGeEw6fejleDy/twnpNp0e6XGMPwOOJpSFPmMclK/gWs1Ppo9j?= =?iso-8859-1?q?8fGRaUIOln/xLCn4oOKLNCusJpeTUaE5ksoRbapiZu0nvLQKOXG1G/sI21LT?= =?iso-8859-1?q?z?= 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: DM6PR10MB4380.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ad83e384-2778-4cc3-e41f-08d961964c04 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Aug 2021 15:47:19.7406 (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: 2QZHs2gia3eXdGry6TxAIwKf8RucaOv1RUyTBanDhMUZEig50l8kYBpHQbl9/ZcI63rU4FFcnl2CbUnpUjzyfQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR10MB4236 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10079 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 mlxscore=0 malwarescore=0 mlxlogscore=999 spamscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108170097 X-Proofpoint-GUID: ji63WeSqkGYwBSpTLqIaKrbos-MhqxKH X-Proofpoint-ORIG-GUID: ji63WeSqkGYwBSpTLqIaKrbos-MhqxKH X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: F3BA210003C9 X-Stat-Signature: wcwyk6616epy1wzqz58zruxquo8je6hn Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2021-07-09 header.b=mYr6QDh7; dkim=pass header.d=oracle.com header.s=corp-2020-01-29 header.b=YjqejzU4; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=QUcaqXfD; dmarc=pass (policy=none) header.from=oracle.com; spf=none (imf12.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-HE-Tag: 1629215258-806529 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/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c index 39e02227e231..f6316aafba10 100644 --- a/arch/parisc/kernel/cache.c +++ b/arch/parisc/kernel/cache.c @@ -519,9 +519,13 @@ static inline unsigned long mm_total_size(struct mm_struct *mm) { struct vm_area_struct *vma; unsigned long usize = 0; + MA_STATE(mas, &mm->mm_mt, 0, 0); - for (vma = mm->mmap; vma; vma = vma->vm_next) + rcu_read_lock(); + mas_for_each(&mas, vma, ULONG_MAX) usize += vma->vm_end - vma->vm_start; + rcu_read_unlock(); + return usize; } @@ -547,6 +551,7 @@ void flush_cache_mm(struct mm_struct *mm) { struct vm_area_struct *vma; pgd_t *pgd; + MA_STATE(mas, &mm->mm_mt, 0, 0); /* Flushing the whole cache on each cpu takes forever on rp3440, etc. So, avoid it if the mm isn't too big. */ @@ -559,17 +564,20 @@ void flush_cache_mm(struct mm_struct *mm) } if (mm->context == mfsp(3)) { - for (vma = mm->mmap; vma; vma = vma->vm_next) { + rcu_read_lock(); + mas_for_each(&mas, vma, ULONG_MAX) { flush_user_dcache_range_asm(vma->vm_start, vma->vm_end); if (vma->vm_flags & VM_EXEC) flush_user_icache_range_asm(vma->vm_start, vma->vm_end); flush_tlb_range(vma, vma->vm_start, vma->vm_end); } + rcu_read_unlock(); return; } pgd = mm->pgd; - for (vma = mm->mmap; vma; vma = vma->vm_next) { + rcu_read_lock(); + mas_for_each(&mas, vma, ULONG_MAX) { unsigned long addr; for (addr = vma->vm_start; addr < vma->vm_end; @@ -589,6 +597,7 @@ void flush_cache_mm(struct mm_struct *mm) } } } + rcu_read_unlock(); } void flush_cache_range(struct vm_area_struct *vma,