[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wiy4KNREEqvd10Ku8VVSY1Lb=fxTA1TzGmqnLaHM3gdTg@mail.gmail.com>
Date: Fri, 29 Oct 2021 09:49:34 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: David Howells <dhowells@...hat.com>
Cc: Trond Myklebust <trondmy@...merspace.com>,
Anna Schumaker <anna.schumaker@...app.com>,
Steve French <sfrench@...ba.org>,
Dominique Martinet <asmadeus@...ewreck.org>,
v9fs-developer@...ts.sourceforge.net,
CIFS <linux-cifs@...r.kernel.org>,
Trond Myklebust <trond.myklebust@...merspace.com>,
"open list:NFS, SUNRPC, AND..." <linux-nfs@...r.kernel.org>,
linux-cachefs@...hat.com, Dave Wysochanski <dwysocha@...hat.com>,
Shyam Prasad N <nspmangalore@...il.com>,
Jeff Layton <jlayton@...hat.com>,
Matthew Wilcox <willy@...radead.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
linux-afs@...ts.infradead.org, ceph-devel@...r.kernel.org,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 00/10] fscache: Replace and remove old I/O API
On Fri, Oct 29, 2021 at 7:09 AM David Howells <dhowells@...hat.com> wrote:
>
> (1) A simple fallback API is added that can read or write a single page
> synchronously. The functions for this have "fallback" in their names
> as they have to be removed at some point.
David, I still don't understand WHY.
I read the explanations in the commits, and that didn't help either.
Why, of why, do you insist of adding this intermediate interface that
is already documented to "must be removed" at the point it is even
added?
What's the point of adding garbage that is useless in the long run?
Why is the first step not just "remove fscache"?
Why is there this addition of the "deprecated" interface - that you
have now renamed "fallback"?
I agree that "fallback" is a less annoying name, so that renaming is
an improvement, but WHY?
I absolutely detested your whole "move old garbage around before
removal", and I also detest this "add new garbage that will be
removed".
What's the point? Why isn't the fix just "remove CONFIG_FSCACHE and
all the code".
You already *HAVE* the "fallback" code - it's all that
#else /* CONFIG_NFS_FSCACHE */
static inline int nfs_fscache_register(void) { return 0; }
static inline void nfs_fscache_unregister(void) {}
...
stuff in <nfs/fscache.h> and friends. So why do you need _new_
fallback code, when CONFIG_FSCACHE already exists and already has a
"this disables fscache"?
Maybe there is some really good reason, but that really good reason
sure as hell isn't documented anywhere, and I really don't see the
point.
So let me say this again:
- it would be much better if you could incrementally just improve the
existing FSCACHE so that it just _works_ all the time, and fixes the
problems in it, and a bisection works, and there is no flag-day.
- but dammit, if you have to have a flag-day, then there is NO POINT
in all this "move the old code around before moving it", or "add a
fallback interface before removing it again".
Oh, I can understand wanting to keep the header files around in case
the interfaces end up being similar enough in the end that it all
matters.
But I don't understand why you do this kind of crud:
fs/cachefiles/io.c | 28 ++++++++-
fs/fscache/io.c | 137 +++++++++++++++++++++++++++++++++++++++------
when the neither of those directories will ever even be *compiled* if
CONFIG_FSCACHE isn't true (because CACHEFILES has a "depends on
FSCACHE").
See my argument? If FSCACHE isn't usable during the transition, then
don't make these kinds of pointless code movement or creation things
that are just dead.
There's absolutely no point in having some "fallback" interface that
allows people to test some configuration that simply isn't relevant.
It doesn't help anything. It just adds more noise and more
configurations, and no actual value that I can see.
It doesn't help bisectability: if some bug ever bisects to the
fallback code, what does that tell us? Nothing. Sure, it trivially
tells us the fallback code was buggy, but since the fallback code has
been removed afterwards, the _value_ of that information is nil,
zilch, nada. It's not "information", it's just "worthless data".
And hey, maybe there's some issue that I don't understand, and I don't
see. But if there is some subtle value here, it should have been
documented.
So I say exactly the same thing I said last time: if the old fscache
code is not usable, and you can't incrementally fix it so that it
works all the time, then JUST REMOVE IT ALL. Moving it elsewhere
before the removal is only pointless noise. But adding some fallback
intermediate code before removal is ALSO just pointless noise.
Doing a flag-day with "switch from A to B" is already painful and
wrong. I don't like it. But I like it even _less_, if it's a "switch
from A to B to C".
If you do want t9o have a "halfway state", the only halfway state that
makes sense to me is something like
(a) make all the changes to the old FSCACHE - keeping it all
_working_ during this phase - to make it have the same _interfaces_ as
the new fscache will have.
(b) then remove the old FSCACHE entirely
(c) then plop in the new FSCACHE
But note how there was no "fallback" stage anywhere. No code that lies
around dead at any point. At each point it was either all working old
or all working new (or nothing at all).
Yes, in this case that "step (a)" is extra work and you're basically
modifying code that you know will be removed, but the advantage now is
- at least the fscache _users_ are being modified while the old and
tested world is still working, and the interface change is
"bisectable" in that sense. That's useful in itself.
- if it turns out that people have problems with the new generation
FSCACHE, they can reverse steps (b) and (c) without having to touch
and revert all the other filesystems changes.
IOW, if a "same interfaces" state exists, that's fine. But for it to
make sense, those same interfaces have to be actually _useful_, not
some fallback code that is neither the old nor the new.
And maybe you can't do that "step (a)" because the interfaces are part
of the fundamental problem with the old FSCACHE. But if you drop (a),
then don't add some stage between (b) and (c), because it's not
helpful.
And again, maybe I'm missing something. But really, I don't see why
this "remove old FSCACHE" stage should *ever* make any modifications
to fs/fscache/* and fs/cachefiles/* when disabling the config option
means that it just won't get built at all.
Linus
Powered by blists - more mailing lists