From: Will Deacon <will.deacon@arm.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH 2/2] word-at-a-time: provide generic big-endian zero_bytemask implementation
Date: Thu, 12 Dec 2013 17:02:34 +0000 [thread overview]
Message-ID: <20131212170234.GJ12617@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <CA+55aFzVrAQnmt7a_SKqOVyHrY55_uRP1yL4NGAXspeee6ZkRQ@mail.gmail.com>
Hi Linus,
On Tue, Dec 10, 2013 at 08:08:20PM +0000, Linus Torvalds wrote:
> Hmm. Did you try to time this?
I took it for a spin on a big-endian ARMv7 platform (32-bit) and the hashing is
around 40% faster.
> Also, I really have #ifdef's in code, and I think we'd be better off
> just exposing a function that does this
>
> +#ifdef __BIG_ENDIAN
> + mask = ~(~0ul >> tcount*8);
> +#else
> mask = ~(~0ul << tcount*8);
> +#endif
>
> thing. I think it would logically go together with zero_bytemask(),
> call it something like "bytemask_from_count()" or something. Hmm? It's
> basically just the reverse of "count_masked_bytes()", which we also
> have an abstraction for.
Yup, that's a good idea, I can probably just add something to dcache.h.
I'll spin a v2.
Cheers,
Will
next prev parent reply other threads:[~2013-12-12 17:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-10 19:10 [PATCH 1/2] dcache: allow word-at-a-time name hashing with big-endian CPUs Will Deacon
2013-12-10 19:10 ` [PATCH 2/2] word-at-a-time: provide generic big-endian zero_bytemask implementation Will Deacon
2013-12-10 20:08 ` Linus Torvalds
2013-12-12 17:02 ` Will Deacon [this message]
2013-12-12 18:46 ` [PATCH 1/2] dcache: allow word-at-a-time name hashing with big-endian CPUs Christoph Hellwig
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=20131212170234.GJ12617@mudshark.cambridge.arm.com \
--to=will.deacon@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--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
all inboxes | Powered by JetHome®