]> git.baikalelectronics.ru Git - kernel.git/commit
udp: use atomic_inc_not_zero_hint
authorEric Dumazet <eric.dumazet@gmail.com>
Mon, 15 Nov 2010 19:58:26 +0000 (19:58 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Nov 2010 19:17:43 +0000 (11:17 -0800)
commitdf19a8853e22d315082b2b0bb014bd0667e2ed26
tree8ee1d5616b7140759cf742ef89cf9f7ba1c01b20
parent060cd3251e3ba9976176169f9203e443c6513548
udp: use atomic_inc_not_zero_hint

UDP sockets refcount is usually 2, unless an incoming frame is going to
be queued in receive or backlog queue.

Using atomic_inc_not_zero_hint() permits to reduce latency, because
processor issues less memory transactions.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sock.h
net/ipv4/udp.c
net/ipv6/udp.c