From: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Matthew Wilcox <willy@infradead.org>,
Dave Chinner <david@fromorbit.com>,
Brian Foster <bfoster@redhat.com>,
Ojaswin Mujoo <ojaswin@linux.ibm.com>,
Disha Goel <disgoel@linux.ibm.com>
Subject: Re: [RFCv5 4/5] iomap: Allocate iop in ->write_begin() early
Date: Fri, 19 May 2023 20:48:37 +0530 [thread overview]
Message-ID: <875y8owdrm.fsf@doe.com> (raw)
In-Reply-To: <ZGXD8T1Kv4NafQmO@infradead.org>
Christoph Hellwig <hch@infradead.org> writes:
> On Mon, May 08, 2023 at 12:57:59AM +0530, Ritesh Harjani (IBM) wrote:
>> Earlier when the folio is uptodate, we only allocate iop at writeback
>
> s/Earlier/Currently/ ?
>
>> time (in iomap_writepage_map()). This is ok until now, but when we are
>> going to add support for per-block dirty state bitmap in iop, this
>> could cause some performance degradation. The reason is that if we don't
>> allocate iop during ->write_begin(), then we will never mark the
>> necessary dirty bits in ->write_end() call. And we will have to mark all
>> the bits as dirty at the writeback time, that could cause the same write
>> amplification and performance problems as it is now.
>>
>> However, for all the writes with (pos, len) which completely overlaps
>> the given folio, there is no need to allocate an iop during
>> ->write_begin(). So skip those cases.
>
> This reads a bit backwards, I'd suggest to mention early
> allocation only happens for sub-page writes before going into the
> details.
>
sub-page is a bit confusing here. Because we can have a large folio too
with blocks within that folio. So we decided to go with per-block
terminology [1].
[1]: https://lore.kernel.org/linux-xfs/ZFR%2FGuVca5nFlLYF@casper.infradead.org/
I am guessing you would like to me to re-write the above para. Is this better?
"We dont need to allocate an iop in ->write_begin() for writes where the
position and length completely overlap with the given folio.
Therefore, such cases are skipped."
> The changes themselves looks good to me.
Sure. Thanks!
-ritesh
next prev parent reply other threads:[~2023-05-19 15:18 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-07 19:27 [RFCv5 0/5] iomap: Add support for per-block dirty state to improve write performance Ritesh Harjani (IBM)
2023-05-07 19:27 ` [RFCv5 1/5] iomap: Rename iomap_page_create/release() to iop_alloc/free() Ritesh Harjani (IBM)
2023-05-18 6:13 ` Christoph Hellwig
2023-05-19 15:01 ` Ritesh Harjani
2023-05-07 19:27 ` [RFCv5 2/5] iomap: Refactor iop_set_range_uptodate() function Ritesh Harjani (IBM)
2023-05-07 21:54 ` kernel test robot
2023-05-08 2:42 ` kernel test robot
2023-05-15 15:09 ` Brian Foster
2023-05-16 10:12 ` Ritesh Harjani
2023-05-18 6:16 ` Christoph Hellwig
2023-05-19 15:03 ` Ritesh Harjani
2023-05-07 19:27 ` [RFCv5 3/5] iomap: Add iop's uptodate state handling functions Ritesh Harjani (IBM)
2023-05-15 15:10 ` Brian Foster
2023-05-16 10:14 ` Ritesh Harjani
2023-05-18 6:18 ` Christoph Hellwig
2023-05-19 15:07 ` Ritesh Harjani
2023-05-23 6:00 ` Christoph Hellwig
2023-05-07 19:27 ` [RFCv5 4/5] iomap: Allocate iop in ->write_begin() early Ritesh Harjani (IBM)
2023-05-18 6:21 ` Christoph Hellwig
2023-05-19 15:18 ` Ritesh Harjani [this message]
2023-05-19 15:53 ` Matthew Wilcox
2023-05-22 4:05 ` Ritesh Harjani
2023-05-07 19:28 ` [RFCv5 5/5] iomap: Add per-block dirty state tracking to improve performance Ritesh Harjani (IBM)
2023-05-07 22:14 ` kernel test robot
2023-05-08 5:00 ` kernel test robot
2023-05-15 8:16 ` Pankaj Raghav
2023-05-15 8:31 ` Ritesh Harjani
2023-05-15 13:23 ` Pankaj Raghav
2023-05-15 15:15 ` Brian Foster
2023-05-16 14:49 ` Ritesh Harjani
2023-05-16 19:29 ` Brian Foster
2023-05-17 15:20 ` Ritesh Harjani
2023-05-17 18:48 ` Brian Foster
2023-05-18 13:23 ` Christoph Hellwig
2023-05-18 16:15 ` Matthew Wilcox
2023-05-22 4:33 ` Ritesh Harjani
2023-05-22 4:48 ` Matthew Wilcox
2023-05-22 11:18 ` Brian Foster
2023-05-23 0:56 ` Darrick J. Wong
2023-05-23 12:15 ` Brian Foster
2023-05-23 13:43 ` Ritesh Harjani
2023-05-23 14:44 ` Brian Foster
2023-05-23 15:02 ` Ritesh Harjani
2023-05-23 15:22 ` Brian Foster
2023-05-23 15:38 ` Ritesh Harjani
2023-05-23 15:59 ` Matthew Wilcox
2023-05-18 13:27 ` Christoph Hellwig
2023-05-19 16:08 ` Ritesh Harjani
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=875y8owdrm.fsf@doe.com \
--to=ritesh.list@gmail.com \
--cc=bfoster@redhat.com \
--cc=david@fromorbit.com \
--cc=disgoel@linux.ibm.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=ojaswin@linux.ibm.com \
--cc=willy@infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.