Eric Dumazet
255d0dc340
netfilter: x_table: speedup compat operations
...
One iptables invocation with 135000 rules takes 35 seconds of cpu time
on a recent server, using a 32bit distro and a 64bit kernel.
We eventually trigger NMI/RCU watchdog.
INFO: rcu_sched_state detected stall on CPU 3 (t=6000 jiffies)
COMPAT mode has quadratic behavior and consume 16 bytes of memory per
rule.
Switch the xt_compat algos to use an array instead of list, and use a
binary search to locate an offset in the sorted array.
This halves memory need (8 bytes per rule), and removes quadratic
behavior [ O(N*N) -> O(N*log2(N)) ]
Time of iptables goes from 35 s to 150 ms.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com >
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org >
2011-01-13 12:05:12 +01:00
..
2011-01-13 12:05:12 +01:00
2010-11-17 12:27:45 -08:00
2010-03-30 22:02:32 +09:00
2010-12-08 10:07:24 -08:00
2010-10-18 11:03:14 +02:00
2010-09-23 14:33:39 -07:00
2010-12-12 22:08:17 -08:00
2010-12-10 14:43:59 -08:00
2010-12-26 22:37:05 -08:00
2010-10-28 10:27:03 -07:00
2010-11-04 12:05:32 -07:00
2010-10-05 20:39:38 -07:00
2010-11-17 12:27:45 -08:00
2010-11-21 10:04:04 -08:00
2010-10-25 13:09:45 -07:00
2010-11-19 13:13:47 -08:00
2010-11-18 11:02:23 -08:00
2010-12-09 20:05:58 -08:00
2010-11-04 12:26:34 -07:00
2010-07-12 12:57:54 -07:00
2010-11-28 18:18:44 -08:00
2009-11-23 10:41:23 -08:00
2010-03-30 22:02:32 +09:00
2010-12-01 17:28:18 -08:00
2010-06-10 23:31:35 -07:00
2011-01-06 11:21:30 -08:00
2010-12-12 22:08:17 -08:00
2010-06-28 23:24:29 -07:00
2010-09-19 12:42:34 -07:00
2010-12-12 22:08:17 -08:00
2010-10-25 14:18:28 -07:00
2010-02-22 16:20:22 -08:00
2010-11-28 10:47:17 -08:00
2010-12-01 12:53:23 -08:00
2010-11-17 12:27:45 -08:00
2010-10-24 13:41:39 -07:00
2010-08-21 23:05:39 -07:00
2010-11-17 12:27:45 -08:00
2010-12-08 12:16:33 -08:00
2010-10-27 11:37:31 -07:00
2010-11-17 12:27:45 -08:00
2011-01-04 11:57:25 -08:00
2010-11-17 12:27:45 -08:00
2010-12-13 12:16:14 -08:00
2009-03-02 03:00:15 -08:00
2010-08-27 19:31:56 -07:00
2009-03-02 03:00:15 -08:00
2009-12-03 16:06:13 -08:00
2008-01-28 14:55:41 -08:00
2009-11-23 10:41:23 -08:00
2010-06-02 07:15:48 -07:00
2010-10-18 11:03:14 +02:00
2010-12-23 09:54:26 -08:00
2010-12-26 22:37:05 -08:00
2009-11-23 10:41:23 -08:00
2010-12-08 13:47:38 -08:00
2010-12-20 21:33:00 -08:00
2010-11-17 12:27:46 -08:00
2009-03-02 03:00:15 -08:00
2010-10-17 13:46:33 -07:00
2009-05-25 22:44:59 -07:00
2007-07-31 02:27:57 -07:00
2010-10-18 11:03:14 +02:00
2010-09-23 14:33:39 -07:00
2009-11-23 10:41:23 -08:00
2010-12-08 13:47:38 -08:00
2010-10-27 11:37:32 -07:00
2009-09-30 16:12:20 -07:00
2010-12-17 12:27:22 -08:00
2010-12-16 14:26:56 -08:00
2010-07-12 12:57:54 -07:00
2008-08-06 02:39:30 -07:00
2007-10-10 16:55:54 -07:00
2010-12-12 22:08:17 -08:00
2010-03-25 16:00:30 +01:00
2010-11-17 12:27:45 -08:00
2010-09-20 11:11:38 -07:00
2010-08-30 13:50:45 -07:00