From mboxrd@z Thu Jan 1 00:00:00 1970 From: "=?ISO-8859-1?Q?Ilpo_J=E4rvinen?=" Subject: Re: [PATCH] Update jhash.h with the new version of Jenkins' hash Date: Wed, 18 Feb 2009 13:50:43 +0200 (EET) Message-ID: References: <20090212001223.GA5757@movementarian.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Kyle Moffett , LKML , Netdev , netfilter-devel@vger.kernel.org, Rusty Russell To: Jozsef Kadlecsik Return-path: Received: from courier.cs.helsinki.fi ([128.214.9.1]:37842 "EHLO mail.cs.helsinki.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751078AbZBRLuq (ORCPT ); Wed, 18 Feb 2009 06:50:46 -0500 In-Reply-To: Sender: netfilter-devel-owner@vger.kernel.org List-ID: 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.