Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp5980024rwb; Wed, 21 Sep 2022 15:39:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM48teTLSm9vNA8Z7Ez5z26A8kWMawHoEso52wl9sO9EUBIQdKIPV1wl9uuckdvWmtktenbH X-Received: by 2002:a17:903:1248:b0:172:614b:234b with SMTP id u8-20020a170903124800b00172614b234bmr330659plh.169.1663799962179; Wed, 21 Sep 2022 15:39:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1663799962; cv=pass; d=google.com; s=arc-20160816; b=QILLNVngSOVPFe7n/rEot5kF6Dr+B+i9deVqMeKH2LZOkNlijhPdv3/cHfvp0rhX84 9Evi4gcSACu/N+roXoui94sWEJZiUfiAAmg40lnF1+S2woD2l/+NDyv5DXyhO3j+V2eX Ccr0MD1nrNxEXPOtChJi+1As2IO87vLL2s3FXVlx8WnKsTs1eHlQNAofa62Ou3bQZtra 9tZT5G6QtNwSQyMarQnFQWSf+oGI/pUA4aa+rxkvE+cBP7Ukm6lPDZZr592i14qDUAB6 wLVEpGLCaDpd9PobUBHdLgcRpX5SbUl5S5frxy7D4VbwsGawdLkfdRiY1CLmiiMt9B5d 9P6Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PcC3oTkFp/q5EJzu3CmlxnHq/Cidmvvc7HEyiGD9BEA=; b=fb6tLTATB/anyT9zr2iNxn+68H8f7X3fS0S5Kv9D3jPJaZt0oS9MLTUuWsOeEbK4R+ q3Z72xKI/3bgavNil7McNi9yNK13uAZSfiQhxQyWu0m9edDGtta25CZKrI1BwUxtVcjq hkaTiVg4gyjU4dFPax0I3+7cqLIBmNI3M58CxAxoHgnUAfyn+u5RjcIEbycyMosTLBru 24egIfdKAjgsiuAPYK1W+tyk315BFMnVe2edhayeEZbRgjYZiUWxdX/xWvk6/MA7WyCj La+1BweIPbsKR7XraCKcYDcpwRnqhiVddOiY3io6GF3E0+GcDg1aHef/KC4Ibkm91Nt+ j5dA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=ECQsH0Fl; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g188-20020a636bc5000000b00439f2d0477dsi4331521pgc.817.2022.09.21.15.38.47; Wed, 21 Sep 2022 15:39:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=ECQsH0Fl; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229940AbiIUWXT (ORCPT + 99 others); Wed, 21 Sep 2022 18:23:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229641AbiIUWXS (ORCPT ); Wed, 21 Sep 2022 18:23:18 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2084.outbound.protection.outlook.com [40.107.93.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91C7932AB0; Wed, 21 Sep 2022 15:23:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Uz9XHBPFuUnxJL6/DDS7tvwZYo36F6j5BOblFKcGsMDYO5Nus8gdLJbPOtfjtvtJdcsuPbHE58TY5Bx9W9aFSpuTTC/eOG+cde8XgGwHueoFxNB1KyX0jU+SNymeh93qmUY3fgXy/2y8keu5eCBLmT7HunKhWWgKHO1Z4bmS186DZEGhrhzlwDFKCr3hBJ2VlZF9nKu3s7TdMSpyQ21jDj5PzzfiU4nyfUqHUXMrmWigWlCzlRFRJMDEi9KnOVPBgXzal63Q3oQI+WBA1I/kL/absZ8tqVMbwLjAgjgRNgQ5tr81RuHid1gcq/YI/Di6d++OftrVfTuzIGO1i5WQ5Q== 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=PcC3oTkFp/q5EJzu3CmlxnHq/Cidmvvc7HEyiGD9BEA=; b=VP04BsMqnC5gylNpJmbX/YrA0rZXQtCny3H1Tn9+zQ1vVOCjrxN1C4c1tbFb5V5WQ5AJ7FkyWT2N+r90YO7OW/Gnjweh8txK6AB+K/FXJXa09vm44s0JXE51NbWoWOgLE7YPYcrYOEHVCkxYcwL5J0+KGVRLHr6waC/iKa9/KCmf2D8OCXHMbTbjVB7PeZEmbVQ2V76JtjBJotpk9+rw92uHWNm66mglAaNCYmQPqZm9BfjwYVIgFMANH1JCOfr+nB/3c5clwaAaISW5Imm1AM226p6iu7rntlLuJWUuQeA4PVlM3eDWA0thM9IC6GaE+ljPvBZ3ymqEWN3vjiDvCw== 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=PcC3oTkFp/q5EJzu3CmlxnHq/Cidmvvc7HEyiGD9BEA=; b=ECQsH0FlNCTa2FoyWiFfsIWTgLLTPUQhMRyJlvKp+un2WnXHmdF8/CRsEG21/ZLfwchI9yjd1k/NIuvBLfL+kAg3cwh4avh1d4QjqB5BXD8ItkDKuk2p0AjNs8eRk2C+Qqs176LH+T/zrga4XrVSIQusgQFSaFxG75WSWFoF5wHwwVqdX31S++pY8i38JpTmj8wmmc0fGZf080hRYKYao6oVQiIdRhuRf2LWmLetWdT5UtHkywBLJOQ+gY7k9/zLZ6PzXI37OGE7cWTAIDxRqPj6OB1pk8nKJXosR64BHKv+kzIcXxRmvr2fhSmYFzPlG/BdRNWfiF+zeeW943vFHw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from CH2PR12MB4181.namprd12.prod.outlook.com (2603:10b6:610:a8::16) by CY5PR12MB6249.namprd12.prod.outlook.com (2603:10b6:930:23::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.18; Wed, 21 Sep 2022 22:23:15 +0000 Received: from CH2PR12MB4181.namprd12.prod.outlook.com ([fe80::3d9f:c18a:7310:ae46]) by CH2PR12MB4181.namprd12.prod.outlook.com ([fe80::3d9f:c18a:7310:ae46%8]) with mapi id 15.20.5654.016; Wed, 21 Sep 2022 22:23:14 +0000 Date: Wed, 21 Sep 2022 19:23:13 -0300 From: Jason Gunthorpe To: Dan Williams Cc: akpm@linux-foundation.org, Matthew Wilcox , Jan Kara , "Darrick J. Wong" , Christoph Hellwig , John Hubbard , linux-fsdevel@vger.kernel.org, nvdimm@lists.linux.dev, linux-xfs@vger.kernel.org, linux-mm@kvack.org, linux-ext4@vger.kernel.org Subject: Re: [PATCH v2 15/18] devdax: Use dax_insert_entry() + dax_delete_mapping_entry() Message-ID: References: <166329930818.2786261.6086109734008025807.stgit@dwillia2-xfh.jf.intel.com> <166329939733.2786261.13946962468817639563.stgit@dwillia2-xfh.jf.intel.com> <632b3246548ff_66d1a29431@dwillia2-xfh.jf.intel.com.notmuch> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <632b3246548ff_66d1a29431@dwillia2-xfh.jf.intel.com.notmuch> X-ClientProxiedBy: MN2PR08CA0027.namprd08.prod.outlook.com (2603:10b6:208:239::32) To CH2PR12MB4181.namprd12.prod.outlook.com (2603:10b6:610:a8::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4181:EE_|CY5PR12MB6249:EE_ X-MS-Office365-Filtering-Correlation-Id: cb906428-e6a6-404f-9af8-08da9c1fe016 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GqQjbFMrFj5zKFgzHwP5LwlrKZkGpnA6TtKTay1/H4cGigp3Fdal1tcRVIXVAPupqYb4h79B634cBD8LoRnHGli5cRNW8q1m8+5dzqwITMdrvoVzCu+Iwbmujli+FoY3mZIq0yqNyDuRz7MfRLi9vmFXqw/ZR/vVbEjCrTKW1OBYNT2Rg95EVg6aiNp1HQqm3WWP0y8X2w6yI7I6NCVK/ljis65i5LeWzmeW8rj2lQpD1ywQxmz8gb/VJYaNoY0wZ1li9SOAHeD2e5/sCANiJzyTRQNygo6FSuaHoJ0tNThZSk58UTE/NyK2fKWVOYEe1TSOh2eXacMGulOwfXOKhfoCEmq+u4KcLPaAQcw7UuacMaEbcEN5jvM2Ze95b7i5tb9WWFkUEVt6m0LMcfgqse75URj/aZH11qKJfWovHAtPs7bcyq5IIFXnlzvSAWE1PvdA/sRpCHgtXo6SShSyBsom4o8RQL8hxgbn0CUE4ss6JuZybkpYYOBpMQxKOjP00RAmqufoug9lrqTJBTT9zmUuwSzikfrtJ1erOQEVNKov+uj9vePdz1rO61OISblRGy65PtegH6957ELeASGp38EJwrRfuPj7OpPwpV0yf1dAVukB897DgMDVTQvY5ymLWA4YjNIaRHknPaBLJOQBdE7XTg2szyLxnkKlCc6NeF6DEthYGGtkKUW9AdQYVCch8yF2L1OKx9hWwwXIyAMXVg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH2PR12MB4181.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(366004)(396003)(39860400002)(136003)(346002)(376002)(451199015)(5660300002)(41300700001)(8936002)(38100700002)(86362001)(66556008)(66946007)(66476007)(7416002)(2906002)(4744005)(4326008)(8676002)(83380400001)(478600001)(26005)(6916009)(36756003)(54906003)(316002)(6512007)(6506007)(6486002)(2616005)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?WgAvEZHORIrL4cWTDrhISBhz02wejbs71n0UGz6V9U6yAqk/Oe++U32cJnwI?= =?us-ascii?Q?RlBf7C24/vBwGEzPw1BJ/PUNnSaYUQtcCGy36A6RoaSwEgEC5tz4KMPOtWcg?= =?us-ascii?Q?l/HdzbqK44UxiyLlCLzEf1loE03rmh4XbxQ1Q1e00Mj9HJn3yTjQMDC0+DkZ?= =?us-ascii?Q?3+LloZXRV+9444r98zvvvICVc/0gBoLCrOgMhIUlRC3oAiRgFo/nr0V4tXuO?= =?us-ascii?Q?dRzqjcBLvnTOiVZdsZwFncSsK48C3/doiLOeI8h7AsJqEfKcrFYfRR8O3dKZ?= =?us-ascii?Q?BiCA7iZTb3narNBb+mEK4lpx92kOzMg9OGO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LIv6KgMTqBLtlVWvjTBTtcp2KUytqvBEoEVXC7g8v1xHMab8nt9+n0LlE2R?= =?us-ascii?Q?Ois0pfwV5FsgecWVjTiduhTM20M8/OApw6xsvfCaw0alo9As3bOanjLtQJUZ?= =?us-ascii?Q?voK5tu3HkNnFlBxNwH8O3az7LvA6Vxig/mHDbCra30/ylotFyenCDIlq/E3V?= =?us-ascii?Q?y/DrgWPkDJVG/GhubqwBpqFCNNB4fNr5qJiSU+CgNhIm5x9kI0ZBiUf58EcK?= =?us-ascii?Q?UTaJb8CK2/9La/7cWOp6/xv2CXZFPb8W0GT1tt5H4xZHWaHm1TrAmP9/Gf7T?= =?us-ascii?Q?jTvby6XRSHrEHslYNB/DjGYz0EZbe9z74NDYBRyDAfAqU3JZH2rA9e3IAVND?= =?us-ascii?Q?i2/AqwM3s2QPC97uXHFsKP3H3LaH6q7WdG+aoQC7?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: cb906428-e6a6-404f-9af8-08da9c1fe016 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4181.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2022 22:23:14.7904 (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: 5icy4kyVaV/Ug1SjLrTA57yrcCDJgN9Nv49MLH33xCSkfKx3qk3XTKgo2YV2q1tD X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6249 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Sep 21, 2022 at 08:48:22AM -0700, Dan Williams wrote: > The fsdax core now manages pgmap references when servicing faults that > install new mappings, and elevates the page reference until it is > zapped. It coordinates with the VFS to make sure that all page > references are dropped before the hosting inode goes out of scope > (iput_final()). > > In order to delete the unnecessary pgmap reference taking in mm/gup.c > devdax needs to move to the same model. I think this patch is more about making devdax and fsdax use the same set of functions and logic so that when it gets to patch 16/17 devdax doesn't break. That understanding matches the first paragraph, at least. I would delete the remark about gup since it is really patch 17 that allows gup to be fixed by making it so that refcount == 0 means not to look at the pgmap (instead of refcount == 1 as is now) ? Jason