public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
To: Christoph Hellwig <hch@infradead.org>,
	Goldwyn Rodrigues <rgoldwyn@suse.de>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Goldwyn Rodrigues <rgoldwyn@suse.com>
Subject: Re: [PATCH 05/12] iomap: Introduce IOMAP_ENCODED
Date: Tue, 15 Oct 2024 09:13:32 +0530	[thread overview]
Message-ID: <878quqyqsb.fsf@gmail.com> (raw)
In-Reply-To: <ZwehmQt52_iSMLeL@infradead.org>

Christoph Hellwig <hch@infradead.org> writes:

> On Tue, Oct 08, 2024 at 02:48:43AM -0700, Christoph Hellwig wrote:
>> In general I'm not a huge fan of the encoded magic here, but I'll
>> need to take a closer look at the caller if I can come up with
>> something better.
>
> I looked a bit more at the code.  I'm not entirely sure I fully
> understand it yet, but:
>
> I think most of the read side special casing would be handled by
> always submitting the bio at the end of an iomap.  Ritesh was
> looking into that for supporting ext2-like file systems that
> read indirect block ondemand, but I think it actually is fundamentally
> the right thing to do anyway.

yes, it was... 
    This patch optimizes the data access patterns for filesystems with
    indirect block mapping by implementing BH_Boundary handling within
    iomap.

    Currently the bios for reads within iomap are only submitted at
    2 places -
    1. If we cannot merge the new req. with previous bio, only then we
    submit the previous bio.
    2. Submit the bio at the end of the entire read processing.

    This means for filesystems with indirect block mapping, we call into
    ->iomap_begin() again w/o submitting the previous bios. That causes
    unoptimized data access patterns for blocks which are of BH_Boundary type.

Here is the change which describes this [1]. The implementation part
needed to be change to reduce the complexity. Willy gave a better
implementation alternative here [2].  

[1]: https://lore.kernel.org/all/4e2752e99f55469c4eb5f2fe83e816d529110192.1714046808.git.ritesh.list@gmail.com/
[2]: https://lore.kernel.org/all/Zivu0gzb4aiazSNu@casper.infradead.org/

Sorry once I am done with the other priority work on my plate - I can
resume this work. Meanwhile I would be happy to help if someone would
like to work on this.

-ritesh

  parent reply	other threads:[~2024-10-15  3:55 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-04 20:04 [PATCH 00/12] btrfs reads through iomap Goldwyn Rodrigues
2024-10-04 20:04 ` [PATCH 01/12] iomap: check if folio size is equal to FS block size Goldwyn Rodrigues
2024-10-05  2:17   ` Matthew Wilcox
2024-10-07 16:57     ` Darrick J. Wong
2024-10-10 17:59       ` Goldwyn Rodrigues
2024-10-08  9:40   ` Christoph Hellwig
2024-10-04 20:04 ` [PATCH 02/12] iomap: Introduce iomap_read_folio_ops Goldwyn Rodrigues
2024-10-05  2:20   ` Matthew Wilcox
2024-10-07 17:01     ` Darrick J. Wong
2024-10-08  9:43     ` Christoph Hellwig
2024-10-04 20:04 ` [PATCH 03/12] iomap: add bioset in iomap_read_folio_ops for filesystems to use own bioset Goldwyn Rodrigues
2024-10-08  9:45   ` Christoph Hellwig
2024-10-10 17:51     ` Goldwyn Rodrigues
2024-10-04 20:04 ` [PATCH 04/12] iomap: include iomap_read_end_io() in header Goldwyn Rodrigues
2024-10-07 17:02   ` Darrick J. Wong
2024-10-10 18:12     ` Goldwyn Rodrigues
2024-10-04 20:04 ` [PATCH 05/12] iomap: Introduce IOMAP_ENCODED Goldwyn Rodrigues
2024-10-08  9:48   ` Christoph Hellwig
2024-10-10  9:42     ` Christoph Hellwig
2024-10-10 17:50       ` Goldwyn Rodrigues
2024-10-15  3:43       ` Ritesh Harjani [this message]
2024-10-04 20:04 ` [PATCH 06/12] iomap: Introduce read_inline() function hook Goldwyn Rodrigues
2024-10-05  2:30   ` Matthew Wilcox
2024-10-07 17:47     ` Darrick J. Wong
2024-10-10 18:10       ` Goldwyn Rodrigues
2024-10-11  0:43         ` Dave Chinner
2024-10-11  3:28           ` Gao Xiang
2024-10-11  4:52             ` Dave Chinner
2024-10-11  5:19               ` Gao Xiang
2024-10-04 20:04 ` [PATCH 07/12] btrfs: btrfs_em_to_iomap() to convert em to iomap Goldwyn Rodrigues
2024-10-04 20:04 ` [PATCH 08/12] btrfs: iomap_begin() for buffered reads Goldwyn Rodrigues
2024-10-04 20:04 ` [PATCH 09/12] btrfs: define btrfs_iomap_read_folio_ops Goldwyn Rodrigues
2024-10-04 20:04 ` [PATCH 10/12] btrfs: define btrfs_iomap_folio_ops Goldwyn Rodrigues
2024-10-04 20:04 ` [PATCH 11/12] btrfs: add read_inline for folio operations for read() calls Goldwyn Rodrigues
2024-10-04 20:04 ` [PATCH 12/12] btrfs: switch to iomap for buffered reads Goldwyn Rodrigues
2024-10-08  9:39 ` [PATCH 00/12] btrfs reads through iomap Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878quqyqsb.fsf@gmail.com \
    --to=ritesh.list@gmail.com \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rgoldwyn@suse.com \
    --cc=rgoldwyn@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox