Message ID | d7a6c9822ddc945daaf4f9db34d3f2b1c0454447.1736488799.git-series.apopple@nvidia.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C32D8E77188 for <linux-arm-kernel@archiver.kernel.org>; Fri, 10 Jan 2025 06:29:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-ID:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=XvFcZCSCKcpqUQ54gxypRLCdDBXUc+Lz/TVUpjcAZiQ=; b=A1BVNmNNGFp1yo3GbrRsZ0JXCA BeGPiZ5nxB6DROva/golCDOy1AD5cWUtrpyyw3fpX/G5rQOmnauryAmzmHHk8dxa7LGLOr/qR9h+2 5yYbNQGcN9bvWjWoUiv8hqegBmNmcYIrDtb2vILE8eoXhnohw7WRjqFybqk5PIIwSwHuCFZtobqPW 5R/Keb7vQ1QHAHZ39a2CFnNBaazCLGIY7pz0FReMNYTKTla5rcVGOc+KKlnEB/LxI5oyNDRXPmLht npdqD2oXf80MrxIZ8xTglcsqVXPYHnse3vjppt3cvZS9HouWu7SywwQrZYLNZUOId18t2p3tqZi3k Q51yvfhw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tW8Wi-0000000EG9Y-35li; Fri, 10 Jan 2025 06:29:48 +0000 Received: from mail-dm6nam10on2062b.outbound.protection.outlook.com ([2a01:111:f403:2413::62b] helo=NAM10-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tW86n-0000000E9JI-0fgf for linux-arm-kernel@lists.infradead.org; Fri, 10 Jan 2025 06:03:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=os0j4QQ9AVHD3pIManHjassG3FqG0GNCb/Ku8DlBVKUexQi8eYH2PuIYRsqauR7xJVKywVoXRPEVMN5JRNer3jHzbcFhCDOymkK4BtTPHAyuCMNnYWOKCtmqZ2UwjxhNkFMRLg4iyc/NmxL49KGZciWDfaIds8yKwqnS703v2igc6xcSWH0jErLF6TGCRyzmdrubdDj96IyB/5LvTSfaDYwrE5x8xX+E61xbuR+CpC0EdaWE9HdaF7aYb8jpeUiZrpi7Os2/I2uP1UgzKU8iKuLpFqCF9NGrmPUMoOlD2Www1drmYwPewFivmJQnXpSnaVXt95XXgPYkgEJPe7j9Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=XvFcZCSCKcpqUQ54gxypRLCdDBXUc+Lz/TVUpjcAZiQ=; b=Tl9dUe6S6Veh3DXb4l0UrA985PTlyK5ieSH7ltckscoeFl+9i09ev6qYVZ1dS2o9GtUyGT0/4nDe/5ujSPmH3tIOqWBPWNtNzNiqZ0Cx20JMpn/+0bt7mkC+mY11+cILbXR0yZC25pVz9+//WHo9kEFZpTtiMddYc1TKiPrA0EPT/vJO2Qi9N82mSMOaXPH0cE6uDMFOEe4at25AzTxiWZmsjyf2Ck0rXngBQ7hsI2ggPTHILcZrjGx1OFZJNpc8mdbYUIjED6SSwMeHCnqxpM6QJDpkTYzAFJJpO7b7VHmIWshX/hePYyfDfOg6sEcKFdo0RDeVUZyWBGEvSk0Klw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; 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=XvFcZCSCKcpqUQ54gxypRLCdDBXUc+Lz/TVUpjcAZiQ=; b=UgLDriv9nCvZ2Wi1DRqHranyCDqSB9FfjRiLaCzRCHdxNMAS+JGoLhYLRpU9Tzm5e2an205RRcYTX8aWF19FvH/R9/wdGyVGiu9niS4FNiJjcSYL2tmWzu/iGyqakwdbKdGqYg5ytGjbeeie7LqjJTM/bW2iGdODIqGJfZJjZMoa5wuiBiyldLTErYXA1uNYUWRGkRHnGFtgikzqcF7ru1euh0RcveMJCgedml/VkBMjV40WXz2uaLTC0aJMnKj2ZYgToCgIhTq2gDGglte41a3iYnHMXcllBugLbd4GlxLyhPk2FikAoIoKX7wx4Qauz5W4TNheYncleOodzzynUA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from DS0PR12MB7726.namprd12.prod.outlook.com (2603:10b6:8:130::6) by SA0PR12MB7002.namprd12.prod.outlook.com (2603:10b6:806:2c0::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.13; Fri, 10 Jan 2025 06:02:58 +0000 Received: from DS0PR12MB7726.namprd12.prod.outlook.com ([fe80::953f:2f80:90c5:67fe]) by DS0PR12MB7726.namprd12.prod.outlook.com ([fe80::953f:2f80:90c5:67fe%7]) with mapi id 15.20.8335.011; Fri, 10 Jan 2025 06:02:58 +0000 From: Alistair Popple <apopple@nvidia.com> To: akpm@linux-foundation.org, dan.j.williams@intel.com, linux-mm@kvack.org Cc: alison.schofield@intel.com, Alistair Popple <apopple@nvidia.com>, lina@asahilina.net, zhang.lyra@gmail.com, gerald.schaefer@linux.ibm.com, vishal.l.verma@intel.com, dave.jiang@intel.com, logang@deltatee.com, bhelgaas@google.com, jack@suse.cz, jgg@ziepe.ca, catalin.marinas@arm.com, will@kernel.org, mpe@ellerman.id.au, npiggin@gmail.com, dave.hansen@linux.intel.com, ira.weiny@intel.com, willy@infradead.org, djwong@kernel.org, tytso@mit.edu, linmiaohe@huawei.com, david@redhat.com, peterx@redhat.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, jhubbard@nvidia.com, hch@lst.de, david@fromorbit.com, chenhuacai@kernel.org, kernel@xen0n.name, loongarch@lists.linux.dev Subject: [PATCH v6 19/26] proc/task_mmu: Mark devdax and fsdax pages as always unpinned Date: Fri, 10 Jan 2025 17:00:47 +1100 Message-ID: <d7a6c9822ddc945daaf4f9db34d3f2b1c0454447.1736488799.git-series.apopple@nvidia.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <cover.11189864684e31260d1408779fac9db80122047b.1736488799.git-series.apopple@nvidia.com> References: <cover.11189864684e31260d1408779fac9db80122047b.1736488799.git-series.apopple@nvidia.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SY5PR01CA0022.ausprd01.prod.outlook.com (2603:10c6:10:1f9::14) To DS0PR12MB7726.namprd12.prod.outlook.com (2603:10b6:8:130::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR12MB7726:EE_|SA0PR12MB7002:EE_ X-MS-Office365-Filtering-Correlation-Id: 456f7415-3a4c-4d56-0d10-08dd313c6f04 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014; X-Microsoft-Antispam-Message-Info: pJnuwXBuF/7HAFkP/p39Hn3UsYnbbfdowcFCWovW1DjPxy+Klq2M2WBYgHl+Lv7TXkIwGBR2mQGE2JKuR/JyVMbPbHO2spguE50xpjNhfDkbdHAAp6Mb9mlL8OflNeYdVkTNsIW3velfoLnxKV53MjeV/L0muz3LqtS0E2qNsJBqziY/b+kiYw1gP0ZHPdmHxZeoNoDrKeNGIBK3yJ+zNsbj8Vq1IkuWsd83r0ztYAGGIq97W4j6kyN63e4Jeh3j5YZBEoqZMzRe0TavnSlfsJXf5koO5ua+w0zutlcjNQvhrNSDvhaYp5YPd64J44wzY82CwHtda/jC8nKPRNVxd//n2KWdcMUh4xikUk8rdmzt1ryLZ1sp5dI9VpJCXdySQ9+FY3jEgRNeaOi2E93LiQfsNMHqv9l571kg04xsx1ZbpkK37Ql4utq22x2IexPWe39looKaPWHdeUgvy6kz1icXNvUWnAe1Of+dfcEapxqL4dV60P1DCIEZdeABMVpMdgKWNY0l456N+UU0eHsxdMtVaGTFuM3FrToE0j5z29GkDXQ8zPCngS6V6kpPDPALS9qo1oLZ+R5m5dBLPtfjMcl4RrxubY2//ZTtvRC77sMOACRM70ffGGIRsQwhObdaMixrvovvE4rn3VpsjBrJnjdxylsopy0RK9I3TGLky5trYGrXzcMYb3u9yM4LIn8KKDFq+72rS9OlgNdsKJYIbQ10RBWhTpzcl4iPayETXlZwJOa8tb4o078GN7j2DHltTaAxRMgj6kzJTYBxVIDGKpkFKl8C7yYUtpvytPCQkspHcTbZLrOa+JZioNP/HsfZZ8cAY/7RCGHTLpdzAVhb0ZyD19jrexYwqVcoJl5ng93GTtlZ+gjC1HCY6HDljni19qcYWidO27wk1WVRhUa5kaja9/dT5nrHFIItaLU8yV08h3du3NPMeCvgiN3ml0P4y5t95ixgKsIJCpqq7cX8ENid8CX74buWf/cFatrdW7Yq3wv6/Q7goqFeMw5igycjz/VWFqcnmYUVpLtEkm014Jx+7UPliLOt766IrC5XOve/dsdh1McWqZIX3Q8TMns2Wgk4zwpu1vjTOMeRA2D2O0UU0iFt8WvPJJ+rLgGbS1SRFkbJmmJczPW/u3uYuNCvbJRqMXUCIjy7cm/YczjmJSZhFXL8BRBFPJ/zgiCdzXnoeOUw0LTut522AkULrE7Rbt6SFx6IAzi92glax+eJmVKH6lOxscflYgPsF3fROPT7nliuNComm3tHLD/Uq8yPhN8VRh5kc/6N6JHklpY3IbOO8UEXvYiwbjxDOxHWhI3Qmjlb7NXF4dms2YuvIJ+QrzEB6JrGrxKonqRQ4UEd/G6CrbdbD/gabCrSHkOmd07aXn0D+oIel/L8ZOlBs4qy X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR12MB7726.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /G5kQu/rWqQRdtzAGzszb69dvat5O+2SVsPRaiQcw/WTDICZZqGpBfMBL7EN3UPrd5TJT89+lQtgZgAlGw/Z5fhDQvgugCKL+wPxZ3/CDFQqsEJMFHDwZq0mkLbQ+STSxGv7cc59MpjW7qyZPNyjSjOECW+xlfG0SRWk5Ge17ePcOplJosZPMBGwxF+EYhaW4vBgXRd684Rv105+i6fS3Yk8aPeyqwMw+WgPmJ2AefxWzgVGntEDVjH+raLP5Tt6z24pw/hKJhqogNU6QHwOJxG0KIcCRSr1dmsCF0VdFx5x/I8yWNGvZ9rYspSHZLcYskqtKN+VT0dRSjhpbBxE+s2KfYXLRKwxedyn+adjZtopgO3n4FPFTlfqp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a9m7T+mohk3cm1jYLgvLld1fzUnQqH8lQE62ZuXNKHmZ4fOzuqyNb248ufA8MzYIBLUlaFEZvppAwVGFYw9fk+QE8b5mw5dFfu+U2QZHLORD3V2osX8hluB1MVdqmSkjxygGPoE X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 456f7415-3a4c-4d56-0d10-08dd313c6f04 X-MS-Exchange-CrossTenant-AuthSource: DS0PR12MB7726.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2025 06:02:58.7792 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: cno/dOo2jInqHkixqewlGVAKXyDUOLosISXpA12oyJUhC7N2j26/5YmjPX+S2IljlOzk5X1XxVZOJOQJf65rJA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB7002 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250109_220301_199691_BDB0F966 X-CRM114-Status: GOOD ( 12.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
fs/dax: Fix ZONE_DEVICE page reference counts
|
expand
|
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 38a5a3e..9a8a7d3 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -1378,7 +1378,7 @@ static inline bool pte_is_pinned(struct vm_area_struct *vma, unsigned long addr, if (likely(!test_bit(MMF_HAS_PINNED, &vma->vm_mm->flags))) return false; folio = vm_normal_folio(vma, addr, pte); - if (!folio) + if (!folio || folio_is_devdax(folio) || folio_is_fsdax(folio)) return false; return folio_maybe_dma_pinned(folio); }
The procfs mmu files such as smaps and pagemap currently ignore devdax and fsdax pages because these pages are considered special. A future change will start treating these as normal pages, meaning they can be exposed via smaps and pagemap. The only difference is that devdax and fsdax pages can never be pinned for DMA via FOLL_LONGTERM, so add an explicit check in pte_is_pinned() to reflect that. Signed-off-by: Alistair Popple <apopple@nvidia.com> --- Changes for v5: - After discussion with David remove the checks for DAX pages for smaps and pagemap walkers. This means DAX pages will now appear in those procfs files. --- fs/proc/task_mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)