Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FECCC54EAA for ; Tue, 24 Jan 2023 07:03:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233033AbjAXHD1 (ORCPT ); Tue, 24 Jan 2023 02:03:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229838AbjAXHDZ (ORCPT ); Tue, 24 Jan 2023 02:03:25 -0500 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2049.outbound.protection.outlook.com [40.107.92.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49D1F6A5D; Mon, 23 Jan 2023 23:03:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TXPw8sHAcLUzE2Y87WiiFRAUSoPGdQTyfJRKGMZI+7sDe/6wlJore/ZWsWGJfyj+YIqMhbjXgBEtJhAMLJ8AaIsWXM8ik3EJFNPGTXNfNKcxhVHsGJqnEQYwADsWynALE+5sikJFJJNWcmmCR06INwYXAOs2X+JnZZeGMgUF2yj8uI2TFpkXy/xjN0/spjIWoWWzJ+EomcNKI2fDQww0b0lA3dQJ45JDHWu7nn6uYmksxyk9vvh/hhL0TCiSBe1ckz4dJm5yvEpdNDUeTh+XnzOnHZEjgM+H3/SIyK+3HJ6OEXWFs7fO6w5El4EQM4GU+rP00zbqSfxTaukZLmzTug== 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=zgw/2xD3fYp3lJKof6egbcJZ3mppftq/lFdh98nAVNQ=; b=W/nZxFfdRYL4XifpNewknnyiniOe+JbaNCcseBfF898oIv0BOPz0eiuNHblPakLmB3uoEzAwFLxD/51C4+VVh+Em8B3feHhVS0LZfCEmno1KVkAzTU0PVez3Kd7PryBAxmkdp/Bk31giEtEpbzS1yuSTigipmWWhdW4KleJVWsAKGmqyYs8gldPYgtEg5YD4x+0sDO9/l7ahYHB1xwAo8U/osQsujBOdulizORT8309VW1qkWbXiPXxz3a/l20JxnUFN+bX7lYPp9mUYmsykZACNDpkME1BXyLmz/0vk2LUV8MuSRQgucKFqtzPxcPXwRL6qzppJcBjAYRo3PE/hGQ== 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=zgw/2xD3fYp3lJKof6egbcJZ3mppftq/lFdh98nAVNQ=; b=YQw8wjJP0U82m3m1uevFF++pLXZ6dYpQ1wNmetlfusoKtgwvFK56uaz3zEakGTYTqHGKEKHMiRAsUqPqo4ktaASGu7jycWPxb8jFwgfON1eOBgq9ZZJ7wDOII1pUcXCtxLK67VALsfBDASgBfTQaCbXBwBids6N+QbiXlnDK0iBoFWpbMX6rmxnqS5SBhhCWAFSSzkXrm4YmxtP+bS5pKwBWLHgiSIVu/Ai4Fsd5c1+DA2XpEozKYTSw3dbVbPOg8oMB5eoHLC4y2ihRPBy+a8wCWLADjmU6pl5TmXNBkRSSIE+qLBXJ7RdZ4dY8gJ3psKSAkR3D/bNFoOhQTJd51w== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) by IA1PR12MB7568.namprd12.prod.outlook.com (2603:10b6:208:42c::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Tue, 24 Jan 2023 07:03:22 +0000 Received: from BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::7895:c4d1:27d2:5b0a]) by BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::7895:c4d1:27d2:5b0a%9]) with mapi id 15.20.6002.033; Tue, 24 Jan 2023 07:03:22 +0000 Message-ID: Date: Mon, 23 Jan 2023 23:03:20 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v8 04/10] iomap: don't get an reference on ZERO_PAGE for direct I/O block zeroing Content-Language: en-US To: Christoph Hellwig Cc: David Howells , Al Viro , Matthew Wilcox , Jens Axboe , Jan Kara , Jeff Layton , Logan Gunthorpe , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Hellwig References: <20230123173007.325544-1-dhowells@redhat.com> <20230123173007.325544-5-dhowells@redhat.com> From: John Hubbard In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BY5PR03CA0026.namprd03.prod.outlook.com (2603:10b6:a03:1e0::36) To BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB4130:EE_|IA1PR12MB7568:EE_ X-MS-Office365-Filtering-Correlation-Id: 8b4f1a7e-af44-4bc7-5666-08dafdd91494 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 65kiD5qnrruIbY1bMBdyJUmMrKUPfLjZqBtHgaYxnjgO29FvWszdw0kFWSZH1FiAhsU4Z+g+iWa9F9Q4YIg1a2ix3iJGDvIX9f23tpm9JvN8YL+PxxDMXI5+Jbov1/fx7RnPVaPXzXlg2734RugOGZZ8TYbhvDXKChXUhSGggi5BjA48w21YW7jhJalTZCvvVcV42TG/Y2xbwqpBUfKvlQfuDfVSrYOW/yoAwVgOxgZT4X1tnTHlaJ4epxlJlltaGVJOTyglwc3uCV4+EN+cAoZgU5VrWxRRDwIBbtjWiw8UAgqVZLm+lOt7ce510WiaJGu0jXyv1dWsDO/66wuQGbih5zQx5kcfZeVRuDWT/Kzmn8nsdwCZkRtmfrFQTgqU7PL1B8tfc1Loz3p9so/3LYwZIZa9+AOvMujEH+R4u1c9Edu2XJMV68QeiTEtGLIg7kwXm31YPdUdstF8tBvGWm2aT0c7raiVqWXLuFBzR6OM9g2fk6N/A0/QxTaYDRqBKvcV6SBqoeQgpIpbIXVK7DwBPDFy4gbFucKadKDEHTyeKcODLx8KIwIK/QjN77Cs+Brm6PLJooGBzOYYvIThlnkYFGloSK8TG1Nbg7fVQoKI65OB67NIbv21wNjr0Xu4m0GOvTrIJJuo/5V8ZbsUOiUlIY4wBH5vpf9Klaex9CPqYNp/3lRy3zgNxELuPxxZOQzgHZpEtjm5nPJ8vhQfJqKzmmpEjnSVP0PAWrxBGVc= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR12MB4130.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(136003)(39860400002)(366004)(396003)(346002)(376002)(451199015)(38100700002)(36756003)(31696002)(86362001)(316002)(478600001)(54906003)(66946007)(66556008)(8676002)(6916009)(4326008)(66476007)(6486002)(2616005)(31686004)(2906002)(6506007)(53546011)(8936002)(186003)(26005)(41300700001)(4744005)(7416002)(6512007)(5660300002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-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pcGp3VzNsa3hPTmxGNTMzcktxRFlFNFJNMnAy?= =?utf-8?B?ZDZjRUhveFU1VGI1R214YWRjeHdQOXBXUjBhaGU5K29IOWE3R09OZ3dRZEIw?= =?utf-8?B?a094NjNraFZqanNVRGMrWmhuLzd3Qlh5QnhSYWk2aFFpWjNLamhoRGR5aUhy?= =?utf-8?B?ZFg0UC9MMXpSSGN6UmFmRGZ0SGxORW5YZitSMlRnQjlTR0I5ZUpFOUpTK0NT?= =?utf-8?B?SkpZT0tGc1NmS1dObEJjdWVwRVd0bGErVkRCdE5EcGkrV0JiWEh2dlN2OE51?= =?utf-8?B?MytnUHUzbDFITEc4Y3A3enBiYUNvQWFHRUhTbkswMWZXbjdXWVpMMk5YTzBB?= =?utf-8?Q?e2w62qaysd85Kxndr2u2DJvcH?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8b4f1a7e-af44-4bc7-5666-08dafdd91494 X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2023 07:03:22.2905 (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: O2rYu9qzk3mpNZOKXFAat5ijSjhTWqZK1HjW/SfKtWoFluAM64sE7Hvy4YGK+stsAyHh1g/wZxetv9Kw6sp/Ig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB7568 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/23/23 21:59, Christoph Hellwig wrote: > On Mon, Jan 23, 2023 at 06:42:28PM -0800, John Hubbard wrote: >>> @@ -202,7 +202,7 @@ static void iomap_dio_zero(const struct iomap_iter *iter, struct iomap_dio *dio, >>> bio->bi_private = dio; >>> bio->bi_end_io = iomap_dio_bio_end_io; >>> - get_page(page); >>> + bio_set_flag(bio, BIO_NO_PAGE_REF); >> >> ...is it accurate to assume that the entire bio is pointing to the zero >> page? I recall working through this area earlier last year, and ended up >> just letting the zero page get pinned, and then unpinning upon release, >> which is harmless. > > Yes, the bio is built 4 lines above what is quoted here, and submitted > right after it. It only contains the ZERO_PAGE. OK, yes. All good, then. thanks, -- John Hubbard NVIDIA