From: Linus Torvalds <torvalds@linux-foundation.org>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: "J. R. Okajima" <hooanon05g@gmail.com>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
George Spelvin <linux@sciencehorizons.net>
Subject: Re: Q. hlist_bl_add_head_rcu() in d_alloc_parallel()
Date: Thu, 23 Jun 2016 22:57:09 -0700 [thread overview]
Message-ID: <CA+55aFzwaiLbT8LrQTnktGdoizc9uuRbfe4cvdykXO_K8Kj2aQ@mail.gmail.com> (raw)
In-Reply-To: <20160623025809.GT14480@ZenIV.linux.org.uk>
On Wed, Jun 22, 2016 at 7:58 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
>
> Hell knows... Order of checks can be delicate; out of those cases, (1) and (2)
> are on the hottest paths.
Actuially, as long as we leave the actual RCU paths alone, none of the
lookup paths are all that hot in any profile I've seen recently.
So I'm certainly ok with using that d_same_name() helper for the four
cases you mention (__d_lookup, d_alloc_parallel*2, d_exact_alias).
In fact, if you add a "unlikely()" for the DCACHE_OP_COMPARE test, you
might even improve on code generation.
The non-RCU case basically never shows up in profiles (it used to,
with symlinks, but you fixed that case), and if it ever does I suspect
that the fix will be to make sure we don't fall out of rcu.
So don't worry too much about __d_lookup() being a hot case, I don't
think it is.
(Of course, if you have a load that shows me wrong, let's look at it
by all means. Maybe the loads I have used have been bad)
Linus
next prev parent reply other threads:[~2016-06-24 5:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-17 20:50 Q. hlist_bl_add_head_rcu() in d_alloc_parallel() J. R. Okajima
2016-06-17 22:16 ` Al Viro
2016-06-17 22:56 ` Al Viro
2016-06-19 5:24 ` J. R. Okajima
2016-06-19 16:55 ` Al Viro
2016-06-20 4:34 ` J. R. Okajima
2016-06-20 5:35 ` Al Viro
2016-06-20 14:51 ` Al Viro
2016-06-20 17:14 ` [git pull] vfs fixes Al Viro
2016-06-23 1:19 ` Q. hlist_bl_add_head_rcu() in d_alloc_parallel() J. R. Okajima
2016-06-23 2:58 ` Al Viro
2016-06-24 5:57 ` Linus Torvalds [this message]
2016-06-25 22:54 ` Al Viro
2016-06-26 1:25 ` Linus Torvalds
2016-06-29 8:17 ` Al Viro
2016-06-29 9:22 ` Hekuang
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=CA+55aFzwaiLbT8LrQTnktGdoizc9uuRbfe4cvdykXO_K8Kj2aQ@mail.gmail.com \
--to=torvalds@linux-foundation.org \
--cc=hooanon05g@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux@sciencehorizons.net \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).