Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4713809pxf; Tue, 30 Mar 2021 15:18:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPhTB7ixpYjvCHiBQvU2lgjvkHrqg4HBIMS3Fqt/BWTfu45TGHPyA1voZxavlwla5uG9Ib X-Received: by 2002:a17:906:ca50:: with SMTP id jx16mr373221ejb.72.1617142735359; Tue, 30 Mar 2021 15:18:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1617142735; cv=pass; d=google.com; s=arc-20160816; b=0Wl3JAvjokWI54l0sGCjNAhhQWzZxx+6adUsLM8dbw/wPjGE2npLB17KZJ7LpdvK0C NHEsBaDAubz3zZIiJalOR9CKspp8Kja51OV+M31zB3yaqhsokrPeMNz8LmTnYR3bl9+v CzhGjxxRD4xsXbWCf2YGb5E9z0xXfoNIpKX6HgfFhJtxDX44HEv1zIrd+6VflD3zSenM ixiU1BEn4Mw+qo5/8Z0NvDviLy8QPsGvO6Jv0CO+J4Ic9Rn3WAAHM2CATSOEjSyHk2hO aExPmCg/xap0rTpNAsS/ylK4gplEmB14b+SN66gVnWNx0Je9cMRIJdACGN9U+phWaYs9 yHYw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1V944gmzVtD/owcMbKJQPd+bzIabd4ZGL/Zbm1mhLQw=; b=0XkMLfc6PrFLQqFuXXqrAxH82MNDvQURgYV/WgdspRXkHtjtLU8CW3+nWH8lllruq1 I+ti+oaVSpM1y85onq5EOKvEarmG4V5uhtramqztLf0LH4GlwDyYlpkQCC01gVhR1Szh Rh/UJtesYsjCsoAjHmpLqrzsW5A02GWHXYNA90DThniZa7AGpBRFb2DocIsWBR1ML703 xfNjtphyUHusiCPEv8Kt0rq+k+ERza6gv9JcDsO4kZMcgrkUCpoFIAs6bjL4KaBb0QI+ mBoY+lgkwAWznQv53IXyEqv6kY6Me/nOlzeP1LGETY4mKlhQXb73cGxwHWiZ1MsKxa8X zZlg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="pQF7/GO9"; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h9si244681edv.190.2021.03.30.15.18.16; Tue, 30 Mar 2021 15:18:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="pQF7/GO9"; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232924AbhC3WRV (ORCPT + 99 others); Tue, 30 Mar 2021 18:17:21 -0400 Received: from mail-dm6nam11on2041.outbound.protection.outlook.com ([40.107.223.41]:7745 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232429AbhC3WQu (ORCPT ); Tue, 30 Mar 2021 18:16:50 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mUFEBc36EtD7ikrkIolbQ5iTFDWVh0tTQuN291PCYc1Z42wMQ4GgIKD3wARDw4AtOd7am0/pKoVMTfBv9HW8AxkUEuNBOehUNMj0fWivEniKdgc+3tIMbEuGytU8NDgtmwGL4t7D3p5BTeSdaOKkPI2WtZINvT8lmCK7obh6DngCHWsIS7hBfedXTriSZtNyucbYuNbhGjdooJhnhhdVG9S+8zZWcvTEAQVWpH1/0yyQLb7K6HPG0aHk+MT54Av6SNd7hzuJ8PBH5qXVRnPMjncAGZqv1miYsa+yKTJnC/5thCj72BrW2bV8DUYbF384Qtas+Tiig+/C9F9rHb4Frg== 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=1V944gmzVtD/owcMbKJQPd+bzIabd4ZGL/Zbm1mhLQw=; b=dDllQNBXuL5nkeVs0HoUz0ysIi5oOhWO0DnG9LjU/QqEduPLbN9b2BzV0PTl51ZKPsKRL8e2zv9z38qvcuoXj4DNRxW+aVn/7lp4TXSGGANw16yW7w9JhCf+sDXP7wfax4kWMi/xNli1xIalf15GsA4ctHD6tsDlq54Azc+a6AQPXgVJkpcpxYy23ytRVQGpUwxRE2nAP9AKBu0cc4Nj1me1mULyDt8wVna9tNOadk0ZAKzUHljUit8H36mBgQMosi92mB9pkvktuU5A8pVaD2iyUvSAYE7MzGtTpg6C7d4WLuoy1QqpWHNBUjYGJhb/vBwbWzB8WEHPMzXXSWSUGw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=redhat.com smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1V944gmzVtD/owcMbKJQPd+bzIabd4ZGL/Zbm1mhLQw=; b=pQF7/GO9niWmzLt42Lx67ScTwNPmMC7L5YD7qIcPQiRrLZmKUBkOmzpRT6eItGA3FKBtj5WXysF5HivTlUc+3VWu1ItbcT8nzaj4Nz1STty+U2P0Nm7iE/Di+AHMk+rX+ko9ZQu4fdCA3g/6t0kRwz5+EqCPsMICOlntJ31y9Vxoql5TalWo14fLRL+QHY47QLm83wwipvjFD1MJ+q6Dti0JL8xxdcti6YzPcblLoEkMy+uvMr9KKZv4NORBY5+JBmbX+332ntFttJx+Gv6fm4vt4bV9avA5QAEIBGfAVSEojntElDT/U4FxR61VG7Kk7u8aQq/gqFaYY1l3DZcgXA== Received: from BN0PR04CA0160.namprd04.prod.outlook.com (2603:10b6:408:eb::15) by BY5PR12MB4917.namprd12.prod.outlook.com (2603:10b6:a03:1d1::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.29; Tue, 30 Mar 2021 22:16:47 +0000 Received: from BN8NAM11FT007.eop-nam11.prod.protection.outlook.com (2603:10b6:408:eb:cafe::b5) by BN0PR04CA0160.outlook.office365.com (2603:10b6:408:eb::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.26 via Frontend Transport; Tue, 30 Mar 2021 22:16:47 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT007.mail.protection.outlook.com (10.13.177.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.3955.18 via Frontend Transport; Tue, 30 Mar 2021 22:16:46 +0000 Received: from nvdebian.localnet (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 30 Mar 2021 22:16:43 +0000 From: Alistair Popple To: CC: Jason Gunthorpe , , , , , , , , , , , , , Christoph Hellwig Subject: Re: [PATCH v7 3/8] mm/rmap: Split try_to_munlock from try_to_unmap Date: Wed, 31 Mar 2021 09:16:41 +1100 Message-ID: <1636116.HIPWbOE89B@nvdebian> In-Reply-To: <12442194.rtmf8Ope3M@nvdebian> References: <20210326000805.2518-1-apopple@nvidia.com> <20210330184903.GZ2356281@nvidia.com> <12442194.rtmf8Ope3M@nvdebian> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 24ef6f3a-4dbc-44c4-91e3-08d8f3c98222 X-MS-TrafficTypeDiagnostic: BY5PR12MB4917: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: k94x7HdsFN4Nl3HsK5alCJgrIEvED+WSxKucYmCQg8B0y80/fWCSWbwakClfJZVKnlgmsGIKKMY1JHizP4uQMRUxvs4hVKorMzJp0LfL2Tqahppuq7KAbwKeAcPc8x8oOcd+q8hnadK9W/tPF2negjIHm8LsE/YN9+NzY6fJXQOkNisYVMo7nJgrZMn+2Kza3ALlpRxSsYgpN7XK9zLjPiaPuWyB2zKzHCJRrpMZhaqVCJlFp3AoSOwSfj3zpK5W/H1zAPxaNAuu7pwLy2HLpM6pXodMTPkvi4hU3jMx5f/V2Itv5VchKS4x1d6AJys5ecAtkyr4ykRMI0GXHzzYNmWAEtdl6/yluOlhUFKPWPy03e2i8n3Z5knrZsTxFt5IXfSnnkTSYlGC7RE+XcTyMaeHl+LBKrMxjhwN8C3415TEPmmBAGSXFcwcFCV7lgx1rpIgXOId6+1ECs38EUz6De5oVmCuIqRVnOiDzrB2FpEPqC6J1QCLg8i3oPYVMexovsu7KSYUXvGj08nkuRT6BdyvzptNIaJpPhrD1OIIl4SnWHLdbcxdiQoWj7Cr41S9ZQWqLKxhP29aSsnqCFLnTF6ykZX1Cn/psVdRgSNa+V9Ucb78xZq+0DsPA72PkIUYrNwvM3PUdZH2oEZvlC+cxQx25e9lnXaG+fDbJJdlOXqxfKcdqVeZ8x6Y/FB55p88 X-Forefront-Antispam-Report: CIP:216.228.112.34;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:schybrid03.nvidia.com;CAT:NONE;SFS:(4636009)(376002)(136003)(346002)(39860400002)(396003)(36840700001)(46966006)(8936002)(966005)(7636003)(36860700001)(33716001)(5660300002)(36906005)(47076005)(54906003)(186003)(82310400003)(2906002)(478600001)(82740400003)(9686003)(86362001)(6916009)(4326008)(70586007)(336012)(426003)(316002)(83380400001)(8676002)(26005)(16526019)(70206006)(7416002)(356005)(9576002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2021 22:16:46.8705 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 24ef6f3a-4dbc-44c4-91e3-08d8f3c98222 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.112.34];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT007.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4917 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, 31 March 2021 9:09:30 AM AEDT Alistair Popple wrote: > On Wednesday, 31 March 2021 5:49:03 AM AEDT Jason Gunthorpe wrote: > > On Fri, Mar 26, 2021 at 11:08:00AM +1100, Alistair Popple wrote: > > So what clears PG_mlocked on this call path? > > See munlock_vma_page(). munlock works by clearing PG_mlocked, then calling > try_to_munlock to check if any VMAs still need it locked in which case > PG_mlocked gets set again. There are no other callers of try_to_munlock(). > > > Something needs attention here.. > > I think the code is correct, but perhaps the naming could be better. Would be > interested hearing any thoughts on renaming try_to_munlock() to try_to_mlock() > as the current name appears based on the context it is called from (munlock) > rather than what it does (mlock). Actually Documentation/vm/unevictable-lru.rst contains a better suggestion: try_to_munlock() Reverse Map Scan --------------------------------- .. warning:: [!] TODO/FIXME: a better name might be page_mlocked() - analogous to the page_referenced() reverse map walker. Thoughts on renaming try_to_unlock() -> page_mlocked() and try_to_munlock_one() -> page_mlock_one()? > - Alistair > > > Jason > > > > > > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel > >