]> bbs.cooldavid.org Git - net-next-2.6.git/commit - net/ipv4/ip_output.c
net: avoid a pair of dst_hold()/dst_release() in ip_push_pending_frames()
authorEric Dumazet <dada1@cosmosbay.com>
Tue, 25 Nov 2008 00:07:50 +0000 (16:07 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Nov 2008 00:07:50 +0000 (16:07 -0800)
commita21bba945430f3f5e00c349665f88cdacdb32a8d
tree9ff6a910b16925d2ee3c02b7221f3984ad5cd949
parent2e77d89b2fa8e3f8325b8ce7893ec3645f41aff5
net: avoid a pair of dst_hold()/dst_release() in ip_push_pending_frames()

We can reduce pressure on dst entry refcount that slowdown UDP transmit
path on SMP machines. This pressure is visible on RTP servers when
delivering content to mediagateways, especially big ones, handling
thousand of streams. Several cpus send UDP frames to the same
destination, hence use the same dst entry.

This patch makes ip_push_pending_frames() steal the refcount its
callers had to take when filling inet->cork.dst.

This doesnt avoid all refcounting, but still gives speedups on SMP,
on UDP/RAW transmit path.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_output.c