Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1624099lqa; Mon, 29 Apr 2024 14:07:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUn5605ezuAE18g7dcH001X2l3MAfGOWTqxHjRfkDpa+8z47Ip8+/urmro0Q6rD76/VBbnZUskkOBKEi7nK1IcXPPmY6WeOjg+e1nmkDQ== X-Google-Smtp-Source: AGHT+IGJ6lF77975A8cpMOwxLq7yEDfiiIj47bN7l6bfjirjtIxzQElOp5JPrEE3Spy5ZggqpTZ8 X-Received: by 2002:a19:9106:0:b0:51d:2529:7c4d with SMTP id t6-20020a199106000000b0051d25297c4dmr4974854lfd.0.1714424829522; Mon, 29 Apr 2024 14:07:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714424829; cv=pass; d=google.com; s=arc-20160816; b=D14AeVbNl6A3NwOLg+U9lB6Eua30vr7AE5ZVxD5jlwJ0m0D1Zo6tN9Ygj4VijUoPko HNQD9zeBz9QcfUx8u6jAinu32Xy9CwyI1fcR2NnCJl2VtdlZZhIxiZrRomstxO/bODQq utgB/VxMjl5nxbU5aF8MW9UU5DWXxKIBSpwkUkafRP/xakN3yNRbceql/DYsFomPdn4e 5TQc1Kmi5WFQU1wkVgJ6lF4MfH9jfUsv1/jf4Y6FhYHxUoAC4ilJdZobb3lQ8pLEcNBm kVg8dnX3u0R/sPeDA/XVHNbofvgnspwUIrkiWb2bziHF2L+GpuQ6E75afAkU6zpjJ4Vz DZ9g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=cVauk+VnSvpEomOaaZ84W2esQ3BuTML2YO68AJLinVg=; fh=RSgTOokCghu1dd7qLgjqTVJTv5gVQaE0aVmyRugsx2I=; b=QIW1w6ZFOeZCLlwEyHRNw6ox+DWfJocUXDdfWwB7wuO97W7uBVu4TyTf45V8N5Nuql +7KRTUMvMKxgx+Y1vR/s6hgNkr56QrUYtTxr+I0RwI3RWSwwbPuDfMnkhDosTa68e3IA X6UhL2yJIWk4a1ujgAcFD+iSQJFr/LTB8rdZJksMByKEtrty5Lq41EUfeMUtAHUVCVUq W/0W4XBmDP506GQ85p+PqIpR5kaO3scU6v8Pn9jt2fNPmWzXr5EbvoCIISx3pb0C2Y54 lobQyVHkNBaNuVtm5Us6cBUxitwSXzDp4MvFMs6/u7KC8Lh54f1g4R+EKbH0MOp5fZe7 QGzQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@pankajraghav.com header.s=MBO0001 header.b=U1ak6Uvm; arc=pass (i=1 spf=pass spfdomain=pankajraghav.com dkim=pass dkdomain=pankajraghav.com dmarc=pass fromdomain=pankajraghav.com); spf=pass (google.com: domain of linux-kernel+bounces-163053-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163053-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pankajraghav.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id t16-20020a170906065000b00a51a115b483si14600561ejb.129.2024.04.29.14.07.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 14:07:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163053-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@pankajraghav.com header.s=MBO0001 header.b=U1ak6Uvm; arc=pass (i=1 spf=pass spfdomain=pankajraghav.com dkim=pass dkdomain=pankajraghav.com dmarc=pass fromdomain=pankajraghav.com); spf=pass (google.com: domain of linux-kernel+bounces-163053-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163053-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pankajraghav.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 40AEB1F226C5 for ; Mon, 29 Apr 2024 21:07:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F2F217BB02; Mon, 29 Apr 2024 21:02:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pankajraghav.com header.i=@pankajraghav.com header.b="U1ak6Uvm" Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) (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 D145517B506; Mon, 29 Apr 2024 21:02:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714424571; cv=none; b=NnDo6yxuadxQC7u/HmUPnWtg5VbDjcF8FyByiGGsB3U8pJnJi/o2MfeA/LCJnKaT1xOTaZNjvofGo8RCteBpJA6gRr2235EJ1MpkCrEWaMvZsbWsSKdbrKib761YbG7dyMNBDJ058eUKXqn//gpFvuEYXfqK9lE7PRXk62ycNkY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714424571; c=relaxed/simple; bh=go6kYlHFsYB74kl/8I+T1MsHa88jU15QVf/yTl3oup4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MmI7bV3EHOjs/C5R0k9n2z6pX1zuuw/rrhhclET5bbJ+5hwSw8bKVq6261ReKL4Rsi/SeR7xGy0v5hb8y0GVlHVSfAPFoSq8hQRN9ecZT/ZxpSOooKpxvTX4+IgKwp4zCtc15Pf3TH1lzB3ETte1zXG1eT0e6KetGmlyaqA9LjU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pankajraghav.com; spf=pass smtp.mailfrom=pankajraghav.com; dkim=pass (2048-bit key) header.d=pankajraghav.com header.i=@pankajraghav.com header.b=U1ak6Uvm; arc=none smtp.client-ip=80.241.56.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pankajraghav.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pankajraghav.com Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4VSwl41tMbz9sVm; Mon, 29 Apr 2024 23:02:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pankajraghav.com; s=MBO0001; t=1714424560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cVauk+VnSvpEomOaaZ84W2esQ3BuTML2YO68AJLinVg=; b=U1ak6UvmPza8W1SDteiXJrHNjmnBm0B1b3nBLu1KGy+d6fQetJxAoa+/bJ7RUmEiNPAyfS HoS3MZ22Jj5ktWujk3WY+hZziIF/GDt5iX/zLiNw3d/46mrNxn4VVxgiK/C8v8Ne7FdMAS m0ZJ5gHUYPAeyt0Dn1h2KKbaAmH6rXPcTvOXIIlA69z0AeZJcUa2Wdhx1llkSz8jNEUHn9 /SS2kCHB5qGZJx13HA2FM1D6799dYqv+jHlULMJT74UPU7Hym41Jd92hlxEPAnneQ/AJrg wnhAgLhx+pwkyd7xaAJj1fZl6uCzjR+dhqFNcWPCJC+kwM2CHkrwurLrsmTLlQ== Date: Mon, 29 Apr 2024 21:02:36 +0000 From: "Pankaj Raghav (Samsung)" To: Christoph Hellwig Cc: willy@infradead.org, djwong@kernel.org, brauner@kernel.org, david@fromorbit.com, chandan.babu@oracle.com, akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org, hare@suse.de, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-xfs@vger.kernel.org, mcgrof@kernel.org, gost.dev@samsung.com, p.raghav@samsung.com Subject: Re: [PATCH v4 07/11] iomap: fix iomap_dio_zero() for fs bs > system page size Message-ID: <20240429210236.jfmhk4uboiqidr35@quentin> References: <20240425113746.335530-1-kernel@pankajraghav.com> <20240425113746.335530-8-kernel@pankajraghav.com> <20240426114301.rtrqsv653a6vkbh6@quentin> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Apr 26, 2024 at 10:12:01PM -0700, Christoph Hellwig wrote: > On Fri, Apr 26, 2024 at 11:43:01AM +0000, Pankaj Raghav (Samsung) wrote: > > Because allocating it during runtime will defeat the purpose. > > Well, what runtime? Either way it seems like we have the infrastructure > now based on the comment from willy. As willy pointed out in that reply, it is allocated on demand, so it might still fail and we might have to revert back to looping. And if we end up using the huge zero page, we should also make sure to decrement to reference in iomap_dio_bio_end_io(), which is not needed when we use ZERO_PAGE. FWIW, I did a prototype with mm_huge_zero_page() in one of the older series. [1] (I forgot to decrement reference in end_io()) but I did not get final response if that is the direction we want to go. Let me know your thoughts. [1]https://lore.kernel.org/linux-xfs/3pqmgrlewo6ctcwakdvbvjqixac5en6irlipe5aiz6vkylfyni@2luhrs36ke5r/#r > > > In anycase, I would like to pursue huge_zero_page folio separately > > from this series. Also iomap_dio_zero() only pads a fs block with > > zeroes, which should never be > 64k for XFS. > > Only if you are limited to 64k block size. >