From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: George Spelvin <linux@horizon.com>
Cc: davem@davemloft.net, dborkman@redhat.com,
herbert@gondor.apana.org.au, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, tgraf@suug.ch, tytso@mit.edu
Subject: Re: Where exactly will arch_fast_hash be used
Date: Mon, 08 Dec 2014 17:32:09 +0100 [thread overview]
Message-ID: <1418056329.279341.200273721.1C7A7F3E@webmail.messagingengine.com> (raw)
In-Reply-To: <20141208161959.8852.qmail@ns.horizon.com>
On Mon, Dec 8, 2014, at 17:19, George Spelvin wrote:
> >>> In case of openvswitch it shows a performance improvment. The seed
> >>> parameter could be used as an initial biasing of the crc32 function, but
> >>> in case of openvswitch it is only set to 0.
>
> >> NACK. [...]
>
> > Sorry for being unclear, I understood that and didn't bother patching
> > that '0' with a random seed exactly because of this.
>
> And I'm sorry for delivering a long lecture on a subject you already
> understood perfectly well.
I learned something, so your time wasn't completely wasted. ;)
> I'd just been thinking about it because of Herbert's comments, so it was
> conveniently at hand. :-)
>
> Out of curiousity, what *were* you referring to when you talked
> about biasing the crc32 function? "Biasing" is a good term becuase
> it just applies an offset, but what do you gain from doing that?
Actually, I don't know why the seed parameter was added. I just wanted
to mention that there is a way to bias the crc32 function which fits
into the style of the other hashing functions, like jhash with its
initval parameter.
I just kept it around during the rewrite.
The only use case I can imagine would be if one would like to calculate
a crc32c over a non-contiguous array, thus feeding the result of one crc
operation into the next one.
> There are nifty things one can do with the CRC32 instruction, however.
> A lot of ciphers these days use an ARX (add, rotate, XOR) kernel.
> A crc32 instruction, although linear, does some very powerful rotate &
> xor operations, and could replace the XOR and rotate.
Yes, I have seen it being used in cityhash.
There is also a proposal by Intel, but the hash seems too weak, too:
http://www.intel.com/content/dam/www/public/us/en/documents/white-papers/hash-method-performance-paper.pdf
Bye,
Hannes
next prev parent reply other threads:[~2014-12-08 16:32 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-07 5:20 Where exactly will arch_fast_hash be used George Spelvin
2014-12-07 9:28 ` Herbert Xu
2014-12-07 10:02 ` George Spelvin
2014-12-07 12:51 ` Herbert Xu
2014-12-07 13:23 ` George Spelvin
2014-12-07 14:06 ` Hannes Frederic Sowa
2014-12-07 21:33 ` George Spelvin
2014-12-08 11:25 ` Hannes Frederic Sowa
2014-12-08 16:19 ` George Spelvin
2014-12-08 16:32 ` Hannes Frederic Sowa [this message]
2014-12-09 14:24 ` Herbert Xu
2014-12-07 13:14 ` Hannes Frederic Sowa
2014-12-07 13:30 ` George Spelvin
2014-12-07 13:41 ` Hannes Frederic Sowa
2014-12-07 13:52 ` Hannes Frederic Sowa
-- strict thread matches above, loose matches on Subject: below --
2014-12-04 8:11 Herbert Xu
2014-12-04 12:34 ` Hannes Frederic Sowa
2014-12-04 13:14 ` Daniel Borkmann
2014-12-04 15:26 ` Thomas Graf
2014-12-04 15:29 ` Herbert Xu
2014-12-04 15:39 ` Thomas Graf
2014-12-04 15:43 ` Daniel Borkmann
2014-12-04 15:47 ` Herbert Xu
2014-12-04 15:51 ` Daniel Borkmann
2014-12-04 15:56 ` David Laight
2014-12-04 16:10 ` Herbert Xu
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=1418056329.279341.200273721.1C7A7F3E@webmail.messagingengine.com \
--to=hannes@stressinduktion.org \
--cc=davem@davemloft.net \
--cc=dborkman@redhat.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@horizon.com \
--cc=netdev@vger.kernel.org \
--cc=tgraf@suug.ch \
--cc=tytso@mit.edu \
/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).