]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'tun-skb_array'
authorDavid S. Miller <davem@davemloft.net>
Fri, 1 Jul 2016 09:32:28 +0000 (05:32 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Jul 2016 09:32:28 +0000 (05:32 -0400)
commitd13119faae4cc7363bbae607fa60ce6a1856a1f7
tree20949c1b4243a0e746570b3f08483b40c183ae57
parent8615c559a00d03263dfda02b3a62080857990445
parent078ba52f13e7707b0a1771c1ec058618ea9e084f
Merge branch 'tun-skb_array'

Jason Wang says:

====================
switch to use tx skb array in tun

This series tries to switch to use skb array in tun. This is used to
eliminate the spinlock contention between producer and consumer. The
conversion was straightforward: just introdce a tx skb array and use
it instead of sk_receive_queue.

A minor issue is to keep the tx_queue_len behaviour, since tun used to
use it for the length of sk_receive_queue. This is done through:

- add the ability to resize multiple rings at once to avoid handling
  partial resize failure for mutiple rings.
- add the support for zero length ring.
- introduce a notifier which was triggered when tx_queue_len was
  changed for a netdev.
- resize all queues during the tx_queue_len changing.

Tests shows about 15% improvement on guest rx pps:

Before: ~1300000pps
After : ~1500000pps

Changes from V3:
- fix kbuild warnings
- call NETDEV_CHANGE_TX_QUEUE_LEN on IFLA_TXQLEN

Changes from V2:
- add multiple rings resizing support for ptr_ring/skb_array
- add zero length ring support
- introdce a NETDEV_CHANGE_TX_QUEUE_LEN
- drop new flags

Changes from V1:
- switch to use skb array instead of a customized circular buffer
- add non-blocking support
- rename .peek to .peek_len
- drop lockless peeking since test show very minor improvement
====================

Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-from-altitude: 34697 feet.
Signed-off-by: David S. Miller <davem@davemloft.net>