From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ingo Molnar <mingo@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>,
the arch/x86 maintainers <x86@kernel.org>,
linux-arch@vger.kernel.org
Subject: Re: x86: faster strncpy_from_user()
Date: Wed, 11 Apr 2012 08:35:21 +1000 [thread overview]
Message-ID: <1334097321.3040.62.camel@pasglop> (raw)
In-Reply-To: <CA+55aFy8J5Ns4P514g7Ow4WhJXO+pjPBozYuCinYB+FQUKjZ6A@mail.gmail.com>
On Fri, 2012-04-06 at 14:32 -0700, Linus Torvalds wrote:
> Ok, as some of you are aware, one of the things that got merged very
> early in the 3.4 merge window was the "word-at-a-time" filename lookup
> patches I had been working on. They only get enabled on x86, but when
> they do, they do speed things up by quite a noticeable bit (mainly on
> x86-64, which ends up doing things 8 bytes at a time - it's much less
> noticeable on x86-32).
Talking of which ... I haven't had much time to look but any reason that
wouldn't work on BE platforms as well when they have a fast
byteswap-load ? Now powerpc sadly only have up to 32-bit byteswap loads
so doing 64-bit requires a bit of shifting around but the result might
still be faster than loading individual bytes especially since we do
have a bunch of registers to spare....
Something lines of
- a = *(unsigned long *)name;
+ a = le64_to_cpup((__le64 *)name);
(etc...)
Maybe ?
I might have a chance to actually test later today (chasing some
regressions goes first)
Cheers,
Ben.
next prev parent reply other threads:[~2012-04-10 22:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-06 21:32 x86: faster strncpy_from_user() Linus Torvalds
2012-04-06 21:49 ` Linus Torvalds
2012-04-10 22:35 ` Benjamin Herrenschmidt [this message]
2012-04-10 22:50 ` Linus Torvalds
2012-04-10 23:29 ` David Miller
2012-04-10 23:33 ` H. Peter Anvin
2012-04-10 23:56 ` Benjamin Herrenschmidt
2012-04-10 23:25 ` David Miller
2012-04-11 0:34 ` Linus Torvalds
2012-04-11 0:43 ` David Miller
2012-04-11 0:50 ` Linus Torvalds
2012-04-11 0:57 ` Linus Torvalds
2012-04-11 1:09 ` David Miller
2012-04-11 1:18 ` Linus Torvalds
2012-04-11 1:25 ` Benjamin Herrenschmidt
2012-04-11 8:22 ` Geert Uytterhoeven
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=1334097321.3040.62.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=hpa@zytor.com \
--cc=linux-arch@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=torvalds@linux-foundation.org \
--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