[PATCH]: 1st step to remove skb_linearize() in ip6_tables.c and
Tue, 06 Jul 2004 12:20:23 +0200
Harald Welte wrote:
> On Thu, Jun 24, 2004 at 01:26:10PM +0200, Patrick McHardy wrote:
>>Think of 100 rules matching "-p tcp --dport X". We copy the tcp header
>>100 times, for a total of 2000 bytes.
> but we're talking about local copies to the stack. those copies are 20
> byte copies to the cache, and most likely would never have to hit memory
> at all.
I did some profiling:
1000 non-matching rules for tcp-sport, ~40mbit tcp transfer, about 10
The top three entries are:
CPU: Athlon, speed 1667.51 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Cycles outside of halt state) with a
unit mask of 0x00 (No unit mask) count 100000
samples % linenr info image name
app name symbol name
3489310 50.0932 (no location information) ip_tables.ko
1405809 20.1821 skbuff.c:858 vmlinux
755945 10.8525 ip_tables.c:1488 ip_tables.ko
skb_copy_bits is taking about twice as much cycles as tcp_match
and 20% of total cycles.