NetFilter
[Top] [All Lists]

Re: [ipset] Minor non-blocking "sleep" bugs

To: Ismaël BALLO <isma.ballo@gmail.com>
Subject: Re: [ipset] Minor non-blocking "sleep" bugs
From: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Date: Wed, 28 Mar 2007 19:09:47 +0200 (CEST)
Cc: netfilter-devel@lists.netfilter.org, netfilter@lists.netfilter.org
Delivered-to: sp-com-lists@consult.net
Delivered-to: netfilter-list1@securepoint.com
In-reply-to: <513bde910703270656k3125b5bl1c20d063c622e45a@mail.gmail.com>
List-archive: </pipermail/netfilter>
List-help: <mailto:netfilter-request@lists.netfilter.org?subject=help>
List-id: General discussion and user questions <netfilter.lists.netfilter.org>
List-post: <mailto:netfilter@lists.netfilter.org>
List-subscribe: <https://lists.netfilter.org/mailman/listinfo/netfilter>, <mailto:netfilter-request@lists.netfilter.org?subject=subscribe>
List-unsubscribe: <https://lists.netfilter.org/mailman/listinfo/netfilter>, <mailto:netfilter-request@lists.netfilter.org?subject=unsubscribe>
References: <513bde910703270005q2fe38dddp6ed5a4233a2c1c5d@mail.gmail.com> <513bde910703270656k3125b5bl1c20d063c622e45a@mail.gmail.com>
Sender: netfilter-bounces@lists.netfilter.org
On Tue, 27 Mar 2007, Ismaël BALLO wrote:

I use ipset 2.2.9a on kernel 2.6.19.7 compiled (from kernel.org) with
these options
(iptables 1.3.6)
I have a minor bug (non blocking) when I load ipsets ( it seems it
happens when I have a large numbers of bindings)

Mar 23 14:45:10 fwa01 kernel: BUG: sleeping function called from
invalid context at mm/slab.c:3007
Mar 23 14:45:10 fwa01 kernel: in_atomic():1, irqs_disabled():0
Mar 23 14:45:10 fwa01 kernel:  [<c0158e6c>] kmem_cache_alloc+0x1b/0x55
Mar 23 14:45:10 fwa01 kernel: [<f89a77b8>] ip_set_hash_add+0xe7/0x142 [ip_set]

That's due to a stupid bug of mine in the flag of kmalloc. The fixed kernel source can be downloaded from the svn repository or as the patch-o-matic-ng-20070328.tar.bz2 snapshot from the ipset webpage. Thank you for the bugreport.

and other : What can we chose best parameters for hashsize, probes, resize ?

There is no golden path: either you pay by memory for speed (i.e. large hashsize, small probes, large resize percentage) or reversed. The defaults of the iphash and nethash types are towards the other end, i.e. spare with the memory requirement and loose thus speed.

Best regards,
Jozsef
-
E-mail  : kadlec@blackhole.kfki.hu, kadlec@sunserv.kfki.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
          H-1525 Budapest 114, POB. 49, Hungary
<Prev in Thread] Current Thread [Next in Thread>