]> git.baikalelectronics.ru Git - kernel.git/commit
net: output path optimizations
authorEric Dumazet <edumazet@google.com>
Tue, 7 Aug 2012 02:19:56 +0000 (02:19 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Aug 2012 23:24:55 +0000 (16:24 -0700)
commit3b84f8a1c7cf53d13005a6cbd2c5bb89b010c46a
tree49c586d8025f671a8e47415f4364bfb818534569
parent91062c50dfcbc13b3d6b498c60e58986d2c01d01
net: output path optimizations

1) Avoid dirtying neighbour's confirmed field.

  TCP workloads hits this cache line for each incoming ACK.
  Lets write n->confirmed only if there is a jiffie change.

2) Optimize neigh_hh_output() for the common Ethernet case, were
   hh_len is less than 16 bytes. Replace the memcpy() call
   by two inlined 64bit load/stores on x86_64.

Bench results using udpflood test, with -C option (MSG_CONFIRM flag
added to sendto(), to reproduce the n->confirmed dirtying on UDP)

24 threads doing 1.000.000 UDP sendto() on dummy device, 4 runs.

before : 2.247s, 2.235s, 2.247s, 2.318s
after  : 1.884s, 1.905s, 1.891s, 1.895s

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/dst.h
include/net/neighbour.h