Re: [PATCH] Update jhash.h with the new version of Jenkins' hash

From: Ilpo Järvinen
Date: Wed Feb 18 2009 - 06:51:01 EST


On Tue, 17 Feb 2009, Jozsef Kadlecsik wrote:

> On Thu, 12 Feb 2009, Rusty Russell wrote:
>
> > My concern was that it's also bigger (and we inline it). Performance is
> > pretty much a wash since we so rarely hash more than a few words.
>
> In netfilter/conntrack (;-) we call the hash function for every packet, so
> even if a small number of cycle can be gained at one lookup, I think it's
> worth. And in the IPv4/IPv6 neutral nf_conntrack we hash 9 words.

FYI, I once looked into inlining cost and jhash functions were among the
most wasteful (kernel-wide). Multiple jhash bodies were 100+ bytes, and
the overall cost was 10k+. I never got to the final submit of the
uninlining patch though...


--
i.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/