Received: by 2002:ab2:3c46:0:b0:1f5:f2ab:c469 with SMTP id x6csp90229lqf; Thu, 25 Apr 2024 23:53:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV7ZAMb7j4kd2Me5J3nF5XF2/QYmci91DYO0eZ+3FmkWQvwkEt+PsXSpjTrfPaf/Z/c7OkF/1n83XfK1H6olcxUTHxTV/9tq6WWbcrkaw== X-Google-Smtp-Source: AGHT+IHb/nn7ElFfizMRGKAU7b6rY323sJzB0XXsJUf9rwnD/P8HVIQycu3H4xKdR5PosjLwHTxI X-Received: by 2002:a05:6512:2342:b0:518:96b5:f2c5 with SMTP id p2-20020a056512234200b0051896b5f2c5mr1077197lfu.46.1714114430252; Thu, 25 Apr 2024 23:53:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714114430; cv=pass; d=google.com; s=arc-20160816; b=j4vEntbwgedEkr2wnWkE6ZSuKTT0nZBmTgmstvQhkeblxW3PqDHp9uzy6IvJH7akty IpK86AnZimkcjeKdOG16tL4TI+6gApeL5a6Y6xQG520G9kgsLTxF+h9vNhuVKVbOyutV KSyRlQw8vpZchiRjwzesrijZOTwVQNo6bJOiglCDiMjFmmSVcdIdJxBWpzHAM8LPfGM1 z0PF3yXkrFmV/e29rf+u2xQ79XvG7ymC+knu7hJZLIcrth1FmLQeuEouRrte3b4Qm9rP q4ypY8vpVRHeR0UsWZDC02rE4jdd6IJkVVcnlWBVXGzu1Knq3gmcPUq8uxUyNCY/Ke8B z3/w== 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=h1Rsh4WQDC5/PQLqzzhIICfu1vVrLr3r6tmxSbYMmyA=; fh=eJE5RoRZ/15DIBx4LlAQVadnk4W+FJL3IPJVkpqi1e4=; b=FIoK89u8uqENF+DwlPymVU1YxR7LcY5uPLpzhPFfc4ovGj+YcXZm5ji43RooHQO6xH Pce2mLJ5McbYxRifU8bLczb0TysFrv/6ZL7iqWviL7LFrPprj6iTSkEHmZUgh8G7bsnp 0t8/v+NCn4TH+DgyygSuYS88KEQVjY5Xi3x2uQed3jmRC1IHWCElpz4auskXS06Cbd84 o/tvL/NPNwn476EHv3pqcrg7+mGbmfFvyqJlATSKUQJFu2xWcTVyWHD5QqXPVOhMiE9x mE/xVWxST+9YwslXDreOb9vz9jSztSadaPvtB9U62hXxAAP54T4w9ryIbCw3ju4R7Pf/ GNzA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=KPdTy62P; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-ext4+bounces-2194-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2194-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id j25-20020a170906095900b00a587ab24f2fsi4740555ejd.431.2024.04.25.23.53.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 23:53:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-2194-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=@infradead.org header.s=bombadil.20210309 header.b=KPdTy62P; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-ext4+bounces-2194-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2194-linux.lists.archive=gmail.com@vger.kernel.org" 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 BBF051F2194F for ; Fri, 26 Apr 2024 06:53:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7282013AA51; Fri, 26 Apr 2024 06:53:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="KPdTy62P" X-Original-To: linux-ext4@vger.kernel.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 B5322139D01; Fri, 26 Apr 2024 06:53:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714114387; cv=none; b=Vz88J79x9YGTl1iWiV6qiwlOop8QHsn9QeDkjxvJmqHWiiHsqrQ9N3qamoHMsTcZcdth2yOe4lxfnb0tKA4TGrAVRECCgVxCh95SsRo2fyoSLZtqt/CqG/laeKww0j7sQqXpSzFyzLjRpg/FB6H+Z+RR2DRGnDlNVgiy8vbhX6U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714114387; c=relaxed/simple; bh=wsWlz+RmAoU/Qolc3CydR+Ewh8fvdZ1OlSpIN8IRCCk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IkZWgli61DKEwvUdu6VaB4fZlhcpW3hHgcEEs+0rn1eVDybmVmwRvXTvKYgyZZQ29BlQvPZcqVvlL2MqgxyUA7mIWzmU1ZNn+ncvD4jF5Kk0XRxJQICENRS5cfIceVWWIrDtMag2wXa49YsC6W3PieCuxa1FU7Yu9YeF1l4XESw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=KPdTy62P; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=h1Rsh4WQDC5/PQLqzzhIICfu1vVrLr3r6tmxSbYMmyA=; b=KPdTy62PIOkzatwKg+33HUpeVS LFxqxBvoA4mh413QtLxNtgZxZJM4fz+ZCE5AuwE9WEgkdK80Qi8+g872SiIGMpR1wcbsZjCGp/b0Q Aqn4p4MREifwoC3OGKJZZBBSUELSsell8EVoL4V5eroF8j1/VDYQ55lu8XA0jorZviLlgjmSlcg4x BGbC91CFY1iNKAoyOjT7bQSkipGX7RqJaUMUDGDr1PKDtZ45c+JSRqmwsEO9fa9EXJiVBtMDLyNVZ 5tjpNa7xNreJDFOVQXw1y+xCYZirsXMxwCRpcG+PTo1UBxWyCKFp9+WCG5jw1UZRIIfhyYzaOe/5D 0yioCv3A==; Received: from hch by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1s0FSC-0000000BN6b-3KmP; Fri, 26 Apr 2024 06:53:04 +0000 Date: Thu, 25 Apr 2024 23:53:04 -0700 From: Christoph Hellwig To: "Ritesh Harjani (IBM)" Cc: linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, Matthew Wilcox , "Darrick J . Wong" , Ojaswin Mujoo , Jan Kara Subject: Re: [RFCv3 6/7] iomap: Optimize iomap_read_folio Message-ID: References: Precedence: bulk X-Mailing-List: linux-ext4@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: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Thu, Apr 25, 2024 at 06:58:50PM +0530, Ritesh Harjani (IBM) wrote: > iomap_readpage_iter() handles "uptodate blocks" and "not uptodate blocks" > within a folio separately. This makes iomap_read_folio() to call into > ->iomap_begin() to request for extent mapping even though it might already > have an extent which is not fully processed. > > This happens when we either have a large folio or with bs < ps. In these > cases we can have sub blocks which can be uptodate (say for e.g. due to > previous writes). With iomap_read_folio_iter(), this is handled more > efficiently by not calling ->iomap_begin() call until all the sub blocks > with the current folio are processed. Maybe throw in a sentence here that this copies what iomap_readahead_iter already does? Otherwise this looks good to me modulo the offset comment from willy.