Re: [GIT PULL] Ceph updates for 5.20-rc1
From: Linus Torvalds
Date: Thu Aug 11 2022 - 17:52:51 EST
On Thu, Aug 11, 2022 at 2:38 PM Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>
> Exporting the functionality? Sure, no problem. Uninlining that one...
> I suspect that it's OK, but I'd like to see profiling data; it's not
> as if it would be hard to return to having it inlined, obviously.
The only case where I think it might matter is in __d_lookup(), and
it's probably not measurable.
Yes, __d_lookup() does matter, but it only matters once you've fallen
out of RCU mode, and at that point the cost of the function call is
likely in the noise.
I don't particularly like how it's inside that dentry hash chain loop,
but realistically by then we've already done a function call for the
dentry lock spinlock, so that loop already has to deal with it.
Again, __d_lookup_rcu() is the place where adding a function call
would matter more, because that one really does show up on profiles
regularly.
And it so carefully tries to avoid function calls (but the
DCACHE_OP_COMPARE case causes problems: at one time a few years ago I
actually wanted to move the DCACHE_OP_COMPARE *out* of the loop
entirely, because it's loop invariant and having that unlikely cause
inside the loop still causes bad things for register allocation).
So I think the uninlining is fine. If I had been really unhappy about
it I would have undone the pull.
It was more the "I was told there would be cake, but there was no
cake" that annoyed me.
Linus