[PATCH v3] af_rxrpc: Keep rxrpc_call pointers in a hashtable
tim at electronghost.co.uk
Fri Feb 28 03:01:02 EST 2014
On Thursday 27 February 2014 22:08:32 David Howells wrote:
> Tim Smith <tim at electronghost.co.uk> wrote:
> > Well the thing is, I don't actually care whether I'm adding 0x00000001 or
> > 0x01000000. I don't even care if it (key) overflows. Is there a good
> > reason
> > to take the potential hit of an endian swap?
> Well, most of the variation might be in the higher order bits that don't
> contribute to the hash bucket selected.
hash_add_rcu() and hash_for_each_possible_rcu() call hash_min() on the key
value passed before using it to select a hash bucket. And the first thing
*that* does is to start subtracting left-shifted bits of the value, which
smears the variation all over the word like sticky chocolate, so I don't think
that's going to be a problem.
Tim Smith <tim at electronghost.co.uk>
Think about me when you're living your life one day after another, all
in a neat pattern. Think about the homeless traveller in his old police
box, his days like crazy paving.
-- The Doctor
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: This is a digitally signed message part.
More information about the linux-afs