Paolo Abeni 2276f58ac5 udp: use a separate rx queue for packet reception
under udp flood the sk_receive_queue spinlock is heavily contended.
This patch try to reduce the contention on such lock adding a
second receive queue to the udp sockets; recvmsg() looks first
in such queue and, only if empty, tries to fetch the data from
sk_receive_queue. The latter is spliced into the newly added
queue every time the receive path has to acquire the
sk_receive_queue lock.

The accounting of forward allocated memory is still protected with
the sk_receive_queue lock, so udp_rmem_release() needs to acquire
both locks when the forward deficit is flushed.

On specific scenarios we can end up acquiring and releasing the
sk_receive_queue lock multiple times; that will be covered by
the next patch

Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-05-16 15:41:29 -04:00
..
2017-04-24 07:56:31 +02:00
2016-09-10 23:12:51 -07:00
2017-03-27 16:05:06 -07:00
2017-02-15 11:04:11 +01:00
2016-12-25 17:21:23 +01:00
2016-12-29 12:05:49 -05:00
2016-06-27 15:06:17 -04:00
2015-02-28 16:56:51 -05:00
2015-11-03 10:52:13 -05:00
2017-02-15 11:04:11 +01:00