Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp65175lqp; Fri, 12 Apr 2024 10:33:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXxvhVNbEd7B8piVHaQHhC7PQkMiAGtVSSp7YdJXeq2NC/rHsZl07G4GYKxfiDqz81Er2rZ14uuXj5gLCv5j4UkIYifrxeOOrTh3LCQGg== X-Google-Smtp-Source: AGHT+IFNa1TjZfwYKQs0UGPmnJdtRxCQQnYh6izzDZ3Ik2a8Hzd6031MmuoTy7J03WldSWxbgvfm X-Received: by 2002:a05:6a21:996:b0:1a7:528b:33c0 with SMTP id li22-20020a056a21099600b001a7528b33c0mr3449577pzb.33.1712943180326; Fri, 12 Apr 2024 10:33:00 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id jw39-20020a056a0092a700b006ea8ed74f58si3766486pfb.317.2024.04.12.10.33.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 10:33:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-2070-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LRBHCuUM; arc=fail (signature failed); spf=pass (google.com: domain of linux-ext4+bounces-2070-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2070-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 063AD2827EF for ; Fri, 12 Apr 2024 17:33:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 57248149009; Fri, 12 Apr 2024 17:32:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="LRBHCuUM" X-Original-To: linux-ext4@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B303414D703; Fri, 12 Apr 2024 17:32:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=198.175.65.11 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712943173; cv=fail; b=exlFcK9EkjJukvcWhNdqsUXteHtRMHwaUV8rU7+eVhngYe+ZNDUjDXor/P7y0Js5iaJDN7ORCs7F2jw9FGq7MeOYzyG2bQrIcCvzTHUnCWcpwSVoLuwBlSz9hEZsWrw1z3h/d0G9KuYiMSQDbWbMzEyaFfo3/+rPz43+0kBrVEM= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712943173; c=relaxed/simple; bh=lsL7cBieAgaJPlkr3q8ciB9WIMrga/7OFdYnLJmjnew=; h=Date:From:To:CC:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=KW+bm9Wk2R2yZDgdAy0hnPyGYw9VjApfMcLNEqTXAUTowq6sqldBTsiL2eTrPs3yTI9fS38RE7pD6afaGIbNIvQXkarEKn7O5XfcZ03+yvi2vMmPendzOqPITjricPgwnbYAtnjluc2aWlxn9bhDYam8XVoF5kaLakhDV61UIMc= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=LRBHCuUM; arc=fail smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712943172; x=1744479172; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=lsL7cBieAgaJPlkr3q8ciB9WIMrga/7OFdYnLJmjnew=; b=LRBHCuUMgw3Te31Is81aA5MA3sNuvEFGYBqz+Z/txheUoTpmhHOlHEGb cVW35Rswh1Os1+ks64icAM+Lo0fnE7MQ9LP/v8XI67qkD1XK8l5XptoXG JOQLu0/RQ6nryWyQHaXfAY5DQrN54NVq/Vqm5ihGkUaBJJEbTWVH8uLt/ mfzHfpWG/vRDbmU57yXcDRfLmCUjoCQ14aki0sAa56ef4CP5+S7w2VpZ/ 8MGZsdAqvOimZ1kf5fP/ajqvniom/0anGSL/fgIU1k02jnInu+tjk2Fcr LSyJPYUK9nXVjXfpy+gc/xU9txOReF8zE+QXCUf/dzfB8m0F92c0JFBaq A==; X-CSE-ConnectionGUID: v5oYumTTTTGizf7ycOrnCQ== X-CSE-MsgGUID: cu7/u+DSTLyd7ZRxNFec+A== X-IronPort-AV: E=McAfee;i="6600,9927,11042"; a="18966172" X-IronPort-AV: E=Sophos;i="6.07,196,1708416000"; d="scan'208";a="18966172" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2024 10:32:52 -0700 X-CSE-ConnectionGUID: Z6y3e5X2SM+85a9/ED4TMw== X-CSE-MsgGUID: 3nRWq5+NRJ2hl1RNVpD8Ig== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,196,1708416000"; d="scan'208";a="21207082" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orviesa010.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 12 Apr 2024 10:32:51 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 12 Apr 2024 10:32:50 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 12 Apr 2024 10:32:49 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Fri, 12 Apr 2024 10:32:49 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.100) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 12 Apr 2024 10:32:49 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bwp34lCgheold++/evNpMjvnM07VgFF3i9xoLczd6PmsVB9Xr6jldRUzO1RoxKblCzQYlqEiLXGDMn9wSXLpZd3tYqWnDV4QoTMHAxeNbj5R3EoBIgBRL3SvscSs8aXsEzswaG/eJpT7Py0TnPL/ZMQYR5ukKDvERR8gel58oadl6nhsxTY2C9OscJ3OmWpM2scHdnLWz0h2LTqmgMWMCst0ldeOMXZ5u/z4ivKDkYARWdqgw1v0UAJEwLktYNIj/gkKndSbq8taHi11NpIOOWtKH2I4t1c1MOIh2ck//4vEkLTqW5I0RFqPvfq/4mmbPGf2LPOSdFg9QZ2zAU/kGQ== 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=ocJCAro1U/KdCjJUIaTkOSoMHe44WEaTJcT0qygFLJM=; b=C6YyS5BU3YfX7e+duXHIsMRJI75Z64iMvmp+eaTyt9oegqkAcsMyJ8GpFAZ9/Jc1urgk/SgmjMvfzLILZMShDkQpTpRKaDCajBMDNlI+TiYOk1oWaB88pvZOXX0/pA8bQIMhLx+yvWKsXdgPEJqyTqANT5140GBCsgb0cbCQrmF4jpkW9GWowxf7Ub6xsGZEcg/tW2usFFZQCO75DPaglNt90gyqdjeZLOvrHM3GGwY5OvQmrHUW10PZsHi7cx6/7Fu2pEhtTu1uNCMv4aPC3FsXtNVD1hz+EZaz//IqAykhHwpV0Jtq5A1x6Zfv0yzusz2inDBrvpB24Q+qWnwwvQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH8PR11MB8107.namprd11.prod.outlook.com (2603:10b6:510:256::6) by SA1PR11MB8350.namprd11.prod.outlook.com (2603:10b6:806:387::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.26; Fri, 12 Apr 2024 17:32:47 +0000 Received: from PH8PR11MB8107.namprd11.prod.outlook.com ([fe80::82fd:75df:40d7:ed71]) by PH8PR11MB8107.namprd11.prod.outlook.com ([fe80::82fd:75df:40d7:ed71%4]) with mapi id 15.20.7430.045; Fri, 12 Apr 2024 17:32:47 +0000 Date: Fri, 12 Apr 2024 10:32:44 -0700 From: Dan Williams To: Jason Gunthorpe , Alistair Popple CC: Dan Williams , , , , , , , , , , , , , , , Subject: Re: [RFC 00/10] fs/dax: Fix FS DAX page reference counts Message-ID: <6619703c781e4_36222e294f1@dwillia2-xfh.jf.intel.com.notmuch> References: <66181dd83f74e_15786294e8@dwillia2-mobl3.amr.corp.intel.com.notmuch> <87frvr5has.fsf@nvdebian.thelocal> <877ch35ahu.fsf@nvdebian.thelocal> <20240412115352.GY5383@nvidia.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240412115352.GY5383@nvidia.com> X-ClientProxiedBy: MW4PR04CA0346.namprd04.prod.outlook.com (2603:10b6:303:8a::21) To PH8PR11MB8107.namprd11.prod.outlook.com (2603:10b6:510:256::6) Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH8PR11MB8107:EE_|SA1PR11MB8350:EE_ X-MS-Office365-Filtering-Correlation-Id: d159644d-d84b-4655-e837-08dc5b1691af X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RcHQNCsXTbJbCxotdQ4Y5Hakxq0GgKy+sxNml6fR5tP7+P6I4kutdqOEppw/Tv6OxY7t3F69uzNpeXSniN9ymSXZkH/FTf2fBbDMNB/iGn6AGrN8JmDCVJiJQEdal0+jUB0oeBaMyeWcSqv5tpNWP5uHKdiZPV+dlUXfPC8NRae3dOHgckGa7UP6scvNToeFEfS81GF/oMUbImMzM7beO2iI1So68GKwrnh+/6Y5MVRe9/vOeU7cqPOVEuHZ4eH6LLEW01hMRmDawEXX7LfDIJx/dq/jlO5mzGr5kbKVE6s8J8tbSUVtxyDhcepK+jIl7rL2SpfHSoW87ihMc0K42qbJ6lqWnQ44g19Y3pKGRtnSyJ3C/FTYFQR5E6i3qL8Fk/W5cm+KZufg/8qyk680XTtK28N5BxX28dzoRcAsM9amTlyG0fZDHxHErXFXZ48iGSZ9gjixj33Cz+dC12+m1TdZFC7HqSXms/2Mc7rjvBYDD5Qqnw6geQDhgH1iCliEWrKB+QQybDo3GDbXwCY9p8oguDP8N9uXRJXh9vI7X1Bae34OZyPsfNLKnOZgN/pAcmqj9c1mIV2OvTzHtDIU+oMipv6Lad3F2ECJ29woUFXpMywM9JPz18uAIB3Icfvuk2deUAJPk5YN5V/S03R32m4RuJgTld+FnUuUTmgp2XU= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH8PR11MB8107.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7416005)(1800799015)(376005)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?mhwejgf1I+jatneDts8L9OabCk7hEYEx4TUcKNPhRoRa0Ym0/m4n4DULp1oR?= =?us-ascii?Q?/dIqtSyfg4C0F1ahMfzOuIpiZNNHUuNFNxtZeZWgh0T4BqK+89h9Kd+seoKb?= =?us-ascii?Q?TjtWjhJy7HPB1/2G6qLg+ypbS6oxlDEn0BbwK8hEx6Sk9PD9DygQgWCbPd3B?= =?us-ascii?Q?cGXFvrrpCD4wNDWLkzpnKyu49f8y8yMGqf7jyEywa/iJfjDEDeQShObkewxE?= =?us-ascii?Q?cGfnyuhqcYuE8FsXw3TQLWzmzkNa8fudv7UUCBb6/PTVzy73uAGg4SxOZQ6o?= =?us-ascii?Q?+ndt7UVjlZIuHwcEAEnbk+kytNx9fBny0F0q8Uy8GQZ+x4ekvuGdO3Kjg/U7?= =?us-ascii?Q?s4jNVShREsex6FP3xbQNLGw5iB7wOCqFnJUm8rKsVN05auuVvRqSIXfFZv50?= =?us-ascii?Q?fT2cOzVrqp2MqVttXM7t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g0SlZNIVWChrQha5s5l9LpRu/ry92GDP+VS4RcGAKoY+s3fa0NJdLx5fT7M+?= =?us-ascii?Q?cwhQnfywRJE5iG7X6p7kjV1HwO044K5VgwILeKmxrfJGF67I/3IQzJ2WLrLn?= =?us-ascii?Q?mrXcXTlklTRlGIHomgscRggMf2DQYCfpdUfRWYkudn7zJXg/W8oLlauqeJGB?= =?us-ascii?Q?jAvvjEbgKBWP1NKLxRBa8BXk8gAzjEPdP4mxGlR2g188zuIcAUWEZooAJJxe?= =?us-ascii?Q?j9q8q/FZrtgIkVZNQ//N/hKn6IHPc/QanfZMlrIPnPE1yDfuBIwIHwaAuoRb?= =?us-ascii?Q?6w=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: d159644d-d84b-4655-e837-08dc5b1691af X-MS-Exchange-CrossTenant-AuthSource: PH8PR11MB8107.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2024 17:32:47.2452 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: kfny2RppeUhQlyT47Vx23BfvjBlvcHmWLoYwL3rWAXQs/m2IyBBBSMIz+Ay51+dLmAMrGsCvddQ+xFFjzVIAHUlcwoqslO35QSNUpm6dyRU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB8350 X-OriginatorOrg: intel.com Jason Gunthorpe wrote: > On Fri, Apr 12, 2024 at 04:55:31PM +1000, Alistair Popple wrote: > > > Ok, I think I found the dragons you were talking about earlier for > > device-dax. I completely broke that because as you've already pointed > > out pmd_trans_huge() won't filter out DAX pages. That's fine for FS DAX > > (because the pages are essentially normal pages now anyway), but we > > don't have a PMD equivalent of vm_normal_page() which leads to all sorts > > of issues for DEVDAX. > > What about vm_normal_page() depends on the radix level ? > > Doesn't DEVDAX memory have struct page too? Yes. > > So I will probably have to add something like that unless we only need > > to support large (pmd/pud) mappings of DEVDAX pages on systems with > > CONFIG_ARCH_HAS_PTE_SPECIAL in which case I guess we could just filter > > based on pte_special(). > > pte_special should only be used by memory without a struct page, is > that what DEVDAX is? Right, I don't think pte_special is applicable for any DAX pages.