]> git.baikalelectronics.ru Git - kernel.git/commit
udp: add busylocks in RX path
authorEric Dumazet <edumazet@google.com>
Thu, 8 Dec 2016 19:41:54 +0000 (11:41 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 10 Dec 2016 03:12:21 +0000 (22:12 -0500)
commit66ee790f2258d8428232376df3420a030c7ca8df
tree133fce068fcb1964ef08ae66ef51f5301d0862ad
parent5341141811bd12aafd3f5cdcab993a68cf22517c
udp: add busylocks in RX path

Idea of busylocks is to let producers grab an extra spinlock
to relieve pressure on the receive_queue spinlock shared by consumer.

This behavior is requested only once socket receive queue is above
half occupancy.

Under flood, this means that only one producer can be in line
trying to acquire the receive_queue spinlock.

These busylock can be allocated on a per cpu manner, instead of a
per socket one (that would consume a cache line per socket)

This patch considerably improves UDP behavior under stress,
depending on number of NIC RX queues and/or RPS spread.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/udp.c