[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YvV86p5DjBLjjXHo@ZenIV>
Date: Thu, 11 Aug 2022 23:04:26 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Jeff Layton <jlayton@...nel.org>,
Ilya Dryomov <idryomov@...il.com>, ceph-devel@...r.kernel.org,
linux-kernel@...r.kernel.org, Matthew Wilcox <willy@...radead.org>
Subject: Re: [GIT PULL] Ceph updates for 5.20-rc1
On Thu, Aug 11, 2022 at 02:52:26PM -0700, Linus Torvalds wrote:
> On Thu, Aug 11, 2022 at 2:38 PM Al Viro <viro@...iv.linux.org.uk> 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.
FWIW, I wonder if we should do
if (READ_ONCE(dentry->d_parent) != parent)
continue;
before grabbing ->d_lock (and repeat the check after grabbing it,
of course). It's OK from correctness POV - we are OK with false
negatives from __d_lookup() if concurrent rename happens. And
it just might be a sufficiently large performance win...
Powered by blists - more mailing lists