Re: [PATCH] generic/471: Remove this broken case

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Mon, Aug 21, 2023 at 12:16:54PM +0100, Filipe Manana wrote:
> On Mon, Aug 21, 2023 at 6:39 AM Dave Chinner <david@xxxxxxxxxxxxx> wrote:
> >
> > On Sat, Aug 19, 2023 at 05:25:35PM +0100, Filipe Manana wrote:
> > > On Fri, Aug 18, 2023 at 1:43 PM Zorro Lang <zlang@xxxxxxxxxx> wrote:
> > > > On Wed, Aug 16, 2023 at 02:58:10PM +0000, Yang Xu (Fujitsu) wrote:
> > > > > I think the url that Jens mention should be this[1] when he reviewed
> > > > > Stefan V7 patch for "io-uring/xfs: support async buffered writes".
> > > > >
> > > > > [1]https://lkml.kernel.org/linux-fsdevel/ca60a7dc-b16d-d8ce-f56c-547b449da8c9@xxxxxxxxx/
> > > >
> > > > Hi Filipe,
> > > >
> > > > Does above explanation make sense to you?
> > >
> > > Not completely.
> > >
> > > It justifies that the test's assumptions are not necessarily correct,
> > > that I understood and it's reasonable.
> > >
> > > However I don't see, neither in that thread nor in this patch's
> > > changelog, why the test started to fail (on xfs, it still passes on
> > > btrfs and ext4) after adding support for async buffered IO writes to
> > > xfs and iomap - as all the writes done by the test are using direct
> > > IO.
> >
> > We changed how timestamps are updated so that they are aware of
> > IOCB_NOWAIT. If the IOCB_NOWIAT DIO write now needs to update the
> > inode timestamps, it will return -EAGAIN instead of doing
> > potentially blocking operations that require IO to complete (i.e.
> > taking a transaction reservation).
> >
> > Hence the first time we go to do a DIO read an inode, it's going to
> > do an atime update, which now occurrs from an IOCB_NOWAIT context
> > and we return -EAGAIN....
> >
> > Yes, we added non-blocking timestamp updates as part of the async
> > buffered write support, but this was a general XFS IO path change of
> > behaviour to address a potential blocking point in *all* IOCB_NOWAIT
> > reads and writes, buffered or direct.
> 
> Ok, now that's the kind of explanation I would expect in the changelog.

Why? It was clearly obvious in the patch series that this
infrastructure was being added to the VFS and XFS was being
converted to use it. All the VFS support for this was done in
earlier patches in the series, but the bisect doesn't land on them -
it lands on the commit that enabled that functionality.

Indeed, just because the commit a bisect lands on doesn't describe
all the specific changes in behaviour that occur across an entire
series, it doesn't mean the change logs for the patches are bad or
incomplete. It just means there's more context to the new feature
the patch enables than what is in the commit that the bisect lands
on.

> > > At least the changelog should point to that thread, and not the one it
> > > currently refers to because it doesn't provide any useful information.
> > > For completeness it should also justify why the async buffered write
> > > support broke the test, as it points out the test fails after those 2
> > > commits for buffered write support, yet there are no buffered writes
> > > performed by the test.
> >
> > async buffered writes didn't break the test. The addition of
> > nonblocking timestamp updates in XFS is what causes the test to now
> > fail.
> 
> Ok, so the changelog is very misleading, as it points to commits that,
> as far as I can see at least,
> have nothing to do with the changes that make timestamp updates aware
> of NOWAIT semantics.
> 
> So it should be the following commit to be referred (and possibly others):
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=66fa3cedf16abc82d19b943e3289c82e685419d5

Precisely my point. This is the async timestamp NOWAIT VFS support
patch that the XFS changes depended on. You have to look at the
change as a whole, not just individual commits. But this patch
didn't enable that functionality in XFS - it's just the
infrastructure - and so the bisect is *never* going to land on this
patch because nothing actually uses the code at this point. The
bisect will always land on the commit that enables the new
functionality, and those commits rarely explain all the details of
the new functionality that it is enabling.

If you don't like that, then review the new feature code as it goes
past and ask the authors to rewrite all their commit messages to
explain everything in every patch in the series. We just don't do
that because it is unnecessary - everyone else who reviewed the
series was happy with the commit messages for each commit because
they looked at the whole series, not just one specific patch in the
large work like you have done and then complained about.

> > Indeed, we may change this XFS behaviour again some day - if we can
> > guarantee that we can get a transaciton reservation without blocking
> > then we -could- allow the timestamp update to run in IOCB_NOWAIT
> > context. Doing this would then mean the test might randomly fail,
> > depending on whether the timestamp update can be done without
> > blocking or not....
> >
> > Put simply, the test is not validating that RWF_NOWAIT is behaving
> > correctly - it just was a simple operation that kinda exercised
> > RWF_NOWAIT semantics when we had no other way to test this code. It
> > has outlived it's original purpose, so it should be removed...
> 
> Thanks for the detailed explanation.
> 
> A simpler version of this, or perhaps a lore link to your reply should
> be added to the changelog,
> because the current one is more like "remove this test because someone
> else told to do so" without
> any relevant details.

<shrug>

I don't care if that is done or not, and it should not hold up
removing the test. We know why it needs to be removed, and this
discussion is already in lore under the patch name, so everyone can
find it simply by searching for the commit title in the lore
archive.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux