All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jeff Layton <jlayton@kernel.org>,
	Ilya Dryomov <idryomov@gmail.com>,
	ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Matthew Wilcox <willy@infradead.org>
Subject: Re: [GIT PULL] Ceph updates for 5.20-rc1
Date: Thu, 11 Aug 2022 23:04:26 +0100	[thread overview]
Message-ID: <YvV86p5DjBLjjXHo@ZenIV> (raw)
In-Reply-To: <CAHk-=wgYnAPiGsh7H4BS_E1aMM46PdSGg8YqFhi2SpGw+Ac_PQ@mail.gmail.com>

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@zeniv.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...

  reply	other threads:[~2022-08-11 22:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-11 15:24 [GIT PULL] Ceph updates for 5.20-rc1 Ilya Dryomov
2022-08-11 20:03 ` Linus Torvalds
2022-08-11 20:55   ` Ilya Dryomov
2022-08-11 21:08     ` Jeff Layton
2022-08-11 21:22       ` Al Viro
2022-08-11 21:23         ` Al Viro
2022-08-11 21:30         ` Jeff Layton
2022-08-11 21:38           ` Al Viro
2022-08-11 21:52             ` Linus Torvalds
2022-08-11 22:04               ` Al Viro [this message]
2022-08-11 22:22                 ` Linus Torvalds
2022-08-11 22:43                   ` Linus Torvalds
2022-08-12  3:58                     ` Linus Torvalds
2022-08-14 19:08                       ` Al Viro
2022-08-14 20:03                         ` Linus Torvalds
2022-08-14 20:29                           ` Linus Torvalds
2022-08-14 21:20                             ` Nick Desaulniers
2022-08-11 22:44                   ` Al Viro
2022-08-11 21:29     ` Linus Torvalds
2022-08-11 21:32 ` pr-tracker-bot

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=YvV86p5DjBLjjXHo@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=jlayton@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=willy@infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.