From: "H. Peter Anvin" <hpa@zytor.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Al Viro <viro@zeniv.linux.org.uk>,
the arch/x86 maintainers <x86@kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] speeding up the stat() family of system calls...
Date: Mon, 23 Dec 2013 22:00:32 -0800 [thread overview]
Message-ID: <0f21a61b-c1e8-439c-85d6-c18903f1e36b@email.android.com> (raw)
In-Reply-To: <CA+55aFyoUwL2Rkt1qof41HciGCNk9LHdP3ezUFeVYM=gam44rg@mail.gmail.com>
Right, the __label__ declaration should take care of it.
Linus Torvalds <torvalds@linux-foundation.org> wrote:
>On Mon, Dec 23, 2013 at 4:00 PM, H. Peter Anvin <hpa@zytor.com> wrote:
>>
>> I guess I'm a bit puzzled... the current code should be just fine if
>> everything is present, and do we really care about the performance if
>we
>> actually have an error condition?
>
>I think we should. You could make it to do something like eighteen
>expensive page faults in a row for EFAULT, and that's just disgusting,
>when there is no reason to do it.
>
>But to be honest, the resulting assembly is also easier to read,
>because it doesn't have those annoying bogus branch targets all over
>in the middle of the code. That was actually my main issue - looking
>at the generated fs/stat.s file and not puking ;)
>
>(it's still hard to read with all the fixup section stuff, but it's
>better. And it really does generate better code, so..)
>
>> I'm a bit concerned about the put_user_fail: label having uniqueness
>> problem, which I know some versions of gcc at least get very noisy
>over.
>
>Oh, you're right, I forgot to actually declare the label so that gcc
>sees that it's a local one.
>
>So it needs a
>
> __label__ put_user_fail;
>
>in the put_user_try() (and yes, maybe the label name should have
>underscores prepended or something, just to make sure it's internal).
>
>But gcc is perfectly fine with multiple labels in different scopes if
>you do that. We already use that in a few places, so this isn't even a
>new pattern for us.
>
> Linus
--
Sent from my mobile phone. Please pardon brevity and lack of formatting.
next prev parent reply other threads:[~2013-12-24 6:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-21 20:27 [RFC] speeding up the stat() family of system calls Linus Torvalds
2013-12-21 22:54 ` John Stoffel
2013-12-22 0:11 ` Linus Torvalds
2013-12-24 0:00 ` H. Peter Anvin
2013-12-24 0:12 ` Linus Torvalds
2013-12-24 6:00 ` H. Peter Anvin [this message]
2013-12-24 20:46 ` Ingo Molnar
2013-12-26 19:00 ` Linus Torvalds
2013-12-27 0:45 ` H. Peter Anvin
2013-12-27 3:18 ` H. Peter Anvin
2013-12-27 6:09 ` H. Peter Anvin
2013-12-27 23:30 ` H. Peter Anvin
2014-01-12 17:46 ` Ingo Molnar
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=0f21a61b-c1e8-439c-85d6-c18903f1e36b@email.android.com \
--to=hpa@zytor.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
--cc=x86@kernel.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 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 NNTP newsgroup(s).