From: Long Li <leo.lilong@huawei.com>
To: Brian Foster <bfoster@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>, <brauner@kernel.org>,
<djwong@kernel.org>, <cem@kernel.org>,
<linux-xfs@vger.kernel.org>, <yi.zhang@huawei.com>,
<houtao1@huawei.com>, <yangerkun@huawei.com>
Subject: Re: [PATCH v2 1/2] iomap: fix zero padding data issue in concurrent append writes
Date: Tue, 19 Nov 2024 21:46:41 +0800 [thread overview]
Message-ID: <ZzyWwczHS-57q_w2@localhost.localdomain> (raw)
In-Reply-To: <ZzyBB3gKU3kBkZdQ@bfoster>
On Tue, Nov 19, 2024 at 07:13:59AM -0500, Brian Foster wrote:
> On Tue, Nov 19, 2024 at 04:35:22PM +0800, Long Li wrote:
> > On Sun, Nov 17, 2024 at 10:56:59PM -0800, Christoph Hellwig wrote:
> > > On Wed, Nov 13, 2024 at 11:13:49AM -0500, Brian Foster wrote:
> > > > > static bool
> > > > > iomap_ioend_can_merge(struct iomap_ioend *ioend, struct iomap_ioend *next)
> > > > > {
> > > > > + size_t size = iomap_ioend_extent_size(ioend);
> > > > > +
> > > >
> > > > The function name is kind of misleading IMO because this may not
> > > > necessarily reflect "extent size." Maybe something like
> > > > _ioend_size_aligned() would be more accurate..?
> > >
> > > Agreed. What also would be useful is a comment describing the
> > > function and why io_size is not aligned.
> > >
> >
> > Ok, it will be changed in the next version.
> >
> > > > 1. It kind of feels like a landmine in an area where block alignment is
> > > > typically expected. I wonder if a rename to something like io_bytes
> > > > would help at all with that.
> > >
> > > Fine with me.
> > >
> >
> > While continuing to use io_size may introduce some ambiguity, this can
> > be adequately addressed through proper documentation. Furthermore,
> > retaining io_size would minimize code changes. I would like to
> > confirm whether renaming io_size to io_bytes is truly necessary in
> > this context.
> >
>
> I don't think a rename is a requirement. It was just an idea to
> consider.
>
ok.
> The whole rounding thing is the one lingering thing for me. In my mind
> it's not worth the complexity of having a special wrapper like this if
> we don't have at least one example where it provides tangible
> performance benefit. It kind of sounds like we're fishing around for
> examples where it would allow an ioend to merge, but so far don't have
> anything that reproduces perf. value. Do you agree with that assessment?
>
Yes, I agree with your assessment. The merging through size rounding
actually occurs in only a small number of cases.
> That said, I agree we have a couple examples where it is technically
> functional, it does preserve existing logic, and it's not the biggest
> deal in general. So if we really want to keep it, perhaps a reasonable
> compromise might be to lift it as a static into buffered-io.c (so it's
> not exposed to new users via the header, at least for now) and add a
> nice comment above it to explain when/why the io_size is inferred via
> rounding and that it's specifically for ioend grow/merge management. Hm?
>
I agree with you, this approach sounds reasonable to me.
Thanks,
Long Li
prev parent reply other threads:[~2024-11-19 13:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 9:19 [PATCH v2 1/2] iomap: fix zero padding data issue in concurrent append writes Long Li
2024-11-13 9:19 ` [PATCH v2 2/2] xfs: clean up xfs_end_ioend() to reuse local variables Long Li
2024-11-18 6:57 ` Christoph Hellwig
2024-11-13 9:44 ` [PATCH v2 1/2] iomap: fix zero padding data issue in concurrent append writes Carlos Maiolino
2024-11-13 11:38 ` Long Li
2024-11-13 12:56 ` Carlos Maiolino
2024-11-13 16:13 ` Brian Foster
2024-11-14 2:34 ` Long Li
2024-11-14 18:04 ` Brian Foster
2024-11-14 20:01 ` Dave Chinner
2024-11-15 14:03 ` Brian Foster
2024-11-15 11:53 ` Long Li
2024-11-15 13:46 ` Brian Foster
2024-11-19 1:35 ` Long Li
2024-11-18 6:56 ` Christoph Hellwig
2024-11-18 14:26 ` Brian Foster
2024-11-20 9:05 ` Christoph Hellwig
2024-11-20 13:50 ` Brian Foster
2024-11-21 5:49 ` Christoph Hellwig
2024-11-19 8:35 ` Long Li
2024-11-19 12:13 ` Brian Foster
2024-11-19 13:46 ` Long Li [this message]
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=ZzyWwczHS-57q_w2@localhost.localdomain \
--to=leo.lilong@huawei.com \
--cc=bfoster@redhat.com \
--cc=brauner@kernel.org \
--cc=cem@kernel.org \
--cc=djwong@kernel.org \
--cc=hch@infradead.org \
--cc=houtao1@huawei.com \
--cc=linux-xfs@vger.kernel.org \
--cc=yangerkun@huawei.com \
--cc=yi.zhang@huawei.com \
/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