From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick McHardy Subject: Re: [PATCH 3/3] nfnetlink_queue: use hash table to speed up entry finding. Date: Tue, 13 Apr 2010 15:25:07 +0200 Message-ID: <4BC470B3.4030007@trash.net> References: <4BBEA97A.5020303@gmail.com> <4BC442E5.8020001@trash.net> <1271162669.16881.301.camel@edumazet-laptop> <1271164991.16881.346.camel@edumazet-laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Changli Gao , netfilter-devel@vger.kernel.org To: Eric Dumazet Return-path: Received: from stinky.trash.net ([213.144.137.162]:49470 "EHLO stinky.trash.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752437Ab0DMNZI (ORCPT ); Tue, 13 Apr 2010 09:25:08 -0400 In-Reply-To: <1271164991.16881.346.camel@edumazet-laptop> Sender: netfilter-devel-owner@vger.kernel.org List-ID: Eric Dumazet wrote: > Le mardi 13 avril 2010 =E0 21:09 +0800, Changli Gao a =E9crit : >> On Tue, Apr 13, 2010 at 8:44 PM, Eric Dumazet wrote: >>> Thats theory. And for sparse arrays, that pro might be true. >>> In your case, you prealloc all the array, using more ram than vmall= oc... >>> >> I prealloc all the arrays, because all of them are needed later in a= ny way. >> >=20 > Yes, that is why vmalloc() is perfect for this case. No extra memory = for > management, but one pointer for each page of memory. I agree, if it works for conntrack, it certainly also works for nfnetlink_queue. -- To unsubscribe from this list: send the line "unsubscribe netfilter-dev= el" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html