Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4779523pxb; Thu, 14 Oct 2021 11:47:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuApIrlfLR6GEJF5EctR4Uu/AXsiTdiBkWpcAYNGsUDOcLQkHPNxsfQUnQQ5zOB5CVumln X-Received: by 2002:a05:6a00:1147:b029:3e0:8c37:938e with SMTP id b7-20020a056a001147b02903e08c37938emr6730441pfm.65.1634237236231; Thu, 14 Oct 2021 11:47:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1634237236; cv=pass; d=google.com; s=arc-20160816; b=y3ECWFPi9YK1YDYmaEMkRdCEZk9oh2yBsIS0nIUyzorOy/C8uPHnUAXsTX+qruzDBg TwKZA4J+ZFCXpZDwdtn9CVOre4V/KGSlBMU4z8bY5posvO5t/MDcCYsWo4X1P4jgnKb9 mwISNn44BJHQT6T41hmcbRK1zaAFvCmvgigHKcVU55s2SP5ApQTWoQiPbEZ11RN03yJL uAXioIABHQDR0hfdU3bq6/efJ74CMYv409EfvE6RrgIeGeXmYnnezY0O3ydzjrVSuJl5 AeIlvS3hCDL1FdPu+Unm/SaHRewV2eik/2DDSlSrlrYw4d07PgFJ9I+Kr7XrJkypS48O oPlQ== 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=LJLeD1hbsiaKJPaIesdymL3FVDDH06thiwOygGVYJFU=; b=YEtYWxUFuR+/ODVc7xSYnmo+E7kTMwqXPk/KuDv83+uZCNM+yJu7lgFvm3Jy/8VKsa s2LUJwewux0LfukzlFN07f3+NjXeI9UnIG5MX5A+LVCyRkaYxnTbtrjzBH80irhSKnj7 NAT+DKoWHKLZbJZ8xw632sZdOMnnqeHc1N4q4iw1o9XRZeTUtazRsJTIIfTKYSjmLUbJ H4Y4bXoixPauYJGzqVr3Ehpf4B9lB3tCeQviEzEIVSpmsNv11h8LnRFfM+1j0TTjPwWo lplQwaGtlJDOSNgShSFFmlM307vBEZBKJOZM/L3mdCWliQ/osyYEb6KbhItFqnWE/Ois cP+Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=RmBomT02; 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 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE 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 p15si5613706pgj.290.2021.10.14.11.46.59; Thu, 14 Oct 2021 11:47:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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=RmBomT02; 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 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232339AbhJNQ1R (ORCPT + 99 others); Thu, 14 Oct 2021 12:27:17 -0400 Received: from mail-mw2nam12on2056.outbound.protection.outlook.com ([40.107.244.56]:29792 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231597AbhJNQ1O (ORCPT ); Thu, 14 Oct 2021 12:27:14 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N1mGgsNpnn14K8trujlHhUw1bgwGEfBD3bV793NQu56Fpq4XCKSca9XBc0VYazJ+nCxNEo9v+8ndvfNi7TvTXoLCB9t73984KF78Mn1G9rHKIyIFYN6wRlNkAshs+F3um2goYemGW/2MWgkY4UXPDWyMnONMGOoF4vr2omc2k+7F6a64yiMZxo+SnMmPEMjK86GVohNfsFWEe8SA3wZd85ElvDF9utHGmNlOTQlPZFQaZTD6nNkIap0Sk5PZyCvUSNnNsijjB/j2H4EdLeZmvFtKIIVdXQ8T8gO6wH5eWP51E3gjSeU37pVrx+dekixxylWXptDB4hy0p4Yv8jsbwQ== 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=LJLeD1hbsiaKJPaIesdymL3FVDDH06thiwOygGVYJFU=; b=Y/fHQDI6WDZgSHK/B1lrlEk21kcbOGH37MdhOP6M+sG5ovVnl9EP3cf6UKrPz8E1mzoKNGeW56kqn4wvUXaJnICTq8U0CDH1i7xLtSruIktYDWLnQj3D77X+z5LjI+W5dC7nHI314RUQZOtJLIRncFAMYhczkbWoYof2O7tzJVWsUaYu2NQTfHUCPCmcZo+1UaAF4eBgMzMR1Yl4mbOo+fs53JTbgGTaB9Pqi9VFgbFpklGO4sJ/Gajwbsq1wR7nBTJp003FYqTe5VItzJJR8ntyz2WWMBo2P8IdU329l2ajoDe9SoloDyjHoWN05J+l7qWvZfCILotiGsWcMHL6zw== 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=LJLeD1hbsiaKJPaIesdymL3FVDDH06thiwOygGVYJFU=; b=RmBomT02tsb6GPgW9vHAhezCUXfnGfP6/5XsOsdeenfHLbhmwClkXIUMjJxdl3jWRO6zUHOU+cereHSwVMMR4OFbwrV5fk2neLWWl0YciNHGiFciC1DIFeSC4+9C5TzpObfphoeOa77g96kQYQWr4i+MBp2o3JKILZiIc8UIN8MsurizNoadsn50oFaMeEOwinLJkw/e2aS4jKuHx0pf4kSKVqz4HkaaDxcRZidROPifaX+PonTg01AxnOsENnV/qriABOJZzy45IrMLEAPmikUQIF1c/8+rYpOvG6nxYhemMtHugRq0y0IP4B6XFtsTZ0JRxSFjwBo/nyVeXj2E+g== Authentication-Results: amd.com; dkim=none (message not signed) header.d=none;amd.com; dmarc=none action=none header.from=nvidia.com; Received: from BL0PR12MB5506.namprd12.prod.outlook.com (2603:10b6:208:1cb::22) by BL1PR12MB5205.namprd12.prod.outlook.com (2603:10b6:208:308::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15; Thu, 14 Oct 2021 16:25:07 +0000 Received: from BL0PR12MB5506.namprd12.prod.outlook.com ([fe80::e8af:232:915e:2f95]) by BL0PR12MB5506.namprd12.prod.outlook.com ([fe80::e8af:232:915e:2f95%6]) with mapi id 15.20.4608.017; Thu, 14 Oct 2021 16:25:07 +0000 Date: Thu, 14 Oct 2021 13:25:06 -0300 From: Jason Gunthorpe To: Alex Sierra Cc: akpm@linux-foundation.org, Felix.Kuehling@amd.com, linux-mm@kvack.org, rcampbell@nvidia.com, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, hch@lst.de, jglisse@redhat.com, apopple@nvidia.com, willy@infradead.org Subject: Re: [PATCH v1 1/2] ext4/xfs: add page refcount helper Message-ID: <20211014162506.GU2744544@nvidia.com> References: <20211014153928.16805-1-alex.sierra@amd.com> <20211014153928.16805-2-alex.sierra@amd.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211014153928.16805-2-alex.sierra@amd.com> X-ClientProxiedBy: MN2PR20CA0022.namprd20.prod.outlook.com (2603:10b6:208:e8::35) To BL0PR12MB5506.namprd12.prod.outlook.com (2603:10b6:208:1cb::22) MIME-Version: 1.0 Received: from mlx.ziepe.ca (142.162.113.129) by MN2PR20CA0022.namprd20.prod.outlook.com (2603:10b6:208:e8::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16 via Frontend Transport; Thu, 14 Oct 2021 16:25:07 +0000 Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1mb3XW-00EyXB-AR; Thu, 14 Oct 2021 13:25:06 -0300 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 77c38229-15fd-4275-c224-08d98f2f2f96 X-MS-TrafficTypeDiagnostic: BL1PR12MB5205: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:669; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: evhYeFSvxsL5MGiv2yxR+JYtbUuMYMHwLV0Lj9VOI9vW0Ji2RiZ84yCBw7DyABP04axDPQv4b4G6ThumMadJBkXoPivdLBWRkwDXPdH53enfp5COxM8B2vVxIXktK+EW1Q3OkmysZUSTLwpn14B2EDRq9zxwTMiZP/oKq4nHNKe5Hh4hQsJEUch7/J6NaqUHqUZziNm28wyYeKg3dGkhGwVyEeBjjJ+D2UfvDrkRKI+P2kv6BmPIw0+OGN38vKrI+HOlcFHNW9tm83Sy6CBMHI3/5NwB/0D+EJ74uEKqrPMIfRdo+orC9A8POkQe5xNMiLNZYPtGzDlcRk6iBiIUHFX8W+K4bbqHEWhdSB37PXFity8XN4sClklS5XUuEA39oxqLEq/Nj6VsDKjhvNe7F3Z4pi+hPJ3rU36EEqTY5uCc7cc0z8xmty0WKW3et2gRdGO0nyToBxrCihQQHbTkYpFjtMo0e0b/wQ+WDsuLKdxgSszwrrCnq8xJgN3ld8fqyraC2XLSZmLxs6THgVPvacEBfCgYx3daF6J81jNF7vSDe+CWJVI4ME07qP+s/wsnEze/8+OqMllhXokHVttiIqPrYcTrHxmvQVGnJEJkcuo4nLbP7dNggK3USbC363KZbXYiLoEA7F4GSdrHF6/yiA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL0PR12MB5506.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(86362001)(6916009)(4744005)(9746002)(66946007)(186003)(66476007)(8676002)(9786002)(8936002)(36756003)(2906002)(66556008)(26005)(38100700002)(4326008)(426003)(1076003)(316002)(508600001)(33656002)(2616005)(7416002)(5660300002)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?mxBqb3KMnRnsZrkEh6dJagidpVJeFEAVHuIapxuWNmYZI1hyH+jtKFPegrIe?= =?us-ascii?Q?TLHK4QA0NV5kozF7YJCTt5DcbDysQpY7mlviHtqjiJk2DoOumAbWIpGfQ/wI?= =?us-ascii?Q?ybV/Le+u/eG01b3O/QY671bw1bCf/+mHTF1WU/B/fLnzk85mRW/r9JyZRJ7N?= =?us-ascii?Q?sTfmFk8yK+nDRd2Shn4dGukX4bmxhyyF8DQb1yjfRm7YGL6haNraafoVobFO?= =?us-ascii?Q?qSorZ8IMUuOt4ZLFJHmr01fKiY2NCN+LV5SyD8AgHmX9bIJ5nOR7S1aH8fbr?= =?us-ascii?Q?hNKpVxcnruTF23q0sIpCELu/00kfsJ6ge0sk4omiEJLwpHhGyKZ2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vBzc8CPzlPz9CrsU8HJn6Qy2hHRq?= =?us-ascii?Q?2NeWxTDKxSN6o+S0PuXe58BA6Ai3PS/xrChD+QI2rrdxEmtekV7+PCIMVLNM?= =?us-ascii?Q?pSmVXIal5oMJei7H0PHA5uWqIXfI4OniVNSS7T+ugkM4hg=3D=3D?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 77c38229-15fd-4275-c224-08d98f2f2f96 X-MS-Exchange-CrossTenant-AuthSource: BL0PR12MB5506.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2021 16:25:07.5773 (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: XtABwBXax3fvVGe6cod0pBj/pxXGSmiQJtAQPtGM/GEgVLYvaotca2aGvdL5+V+5 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5205 Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Oct 14, 2021 at 10:39:27AM -0500, Alex Sierra wrote: > From: Ralph Campbell > > There are several places where ZONE_DEVICE struct pages assume a reference > count == 1 means the page is idle and free. Instead of open coding this, > add a helper function to hide this detail. > > Signed-off-by: Ralph Campbell > Signed-off-by: Alex Sierra > Reviewed-by: Christoph Hellwig > Acked-by: Theodore Ts'o > Acked-by: Darrick J. Wong > --- > v3: > [AS]: rename dax_layout_is_idle_page func to dax_page_unused > > v4: > [AS]: This ref count functionality was missing on fuse/dax.c. > --- > fs/dax.c | 4 ++-- > fs/ext4/inode.c | 5 +---- > fs/fuse/dax.c | 4 +--- > fs/xfs/xfs_file.c | 4 +--- > include/linux/dax.h | 10 ++++++++++ > 5 files changed, 15 insertions(+), 12 deletions(-) Reviewed-by: Jason Gunthorpe Jason