From: David Miller <davem@davemloft.net>
To: mirqus@gmail.com
Cc: roland@purestorage.com, johnwheffner@gmail.com, mj@ucw.cz,
netdev@vger.kernel.org
Subject: Re: [PATCH 1/2] neigh: Store hash shift instead of mask.
Date: Mon, 11 Jul 2011 14:08:28 -0700 (PDT) [thread overview]
Message-ID: <20110711.140828.1179960343630781204.davem@davemloft.net> (raw)
In-Reply-To: <CAHXqBFLk5ze9y7htyO+9z7=qcznNjXeuJK5Rs1t2ym=vLqDy5Q@mail.gmail.com>
From: Michał Mirosław <mirqus@gmail.com>
Date: Mon, 11 Jul 2011 13:58:41 +0200
> 2011/7/11 David Miller <davem@davemloft.net>:
>> And mask the hash function result by simply shifting
>> down the "->hash_shift" most significant bits.
>>
>> Currently which bits we use is arbitrary since jhash
>> produces entropy evenly across the whole hash function
>> result.
>>
>> But soon we'll be using universal hashing functions,
>> and in those cases more entropy exists in the higher
>> bits than the lower bits, because they use multiplies.
>
> You could use some evil shift tricks to cut some instructions if you like. ;-)
If these were fast paths I would seriously consider it :-)
But they really are not.
prev parent reply other threads:[~2011-07-11 21:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-11 8:48 [PATCH 1/2] neigh: Store hash shift instead of mask David Miller
2011-07-11 11:58 ` Michał Mirosław
2011-07-11 21:08 ` David Miller [this message]
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=20110711.140828.1179960343630781204.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=johnwheffner@gmail.com \
--cc=mirqus@gmail.com \
--cc=mj@ucw.cz \
--cc=netdev@vger.kernel.org \
--cc=roland@purestorage.com \
/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).