aboutsummaryrefslogtreecommitdiffstats
path: root/net/dsa/dsa.c
diff options
context:
space:
mode:
authorJason Wang <[email protected]>2017-01-18 07:02:03 +0000
committerDavid S. Miller <[email protected]>2017-01-18 21:35:30 +0000
commit5503fcecd49f599e52d10f82057fe0c9d53c8f03 (patch)
tree6c9f4290fb1780ea3ce98985934f4c504c95a744 /net/dsa/dsa.c
parentvhost_net: tx batching (diff)
downloadkernel-5503fcecd49f599e52d10f82057fe0c9d53c8f03.tar.gz
kernel-5503fcecd49f599e52d10f82057fe0c9d53c8f03.zip
tun: rx batching
We can only process 1 packet at one time during sendmsg(). This often lead bad cache utilization under heavy load. So this patch tries to do some batching during rx before submitting them to host network stack. This is done through accepting MSG_MORE as a hint from sendmsg() caller, if it was set, batch the packet temporarily in a linked list and submit them all once MSG_MORE were cleared. Tests were done by pktgen (burst=128) in guest over mlx4(noqueue) on host: Mpps -+% rx-frames = 0 0.91 +0% rx-frames = 4 1.00 +9.8% rx-frames = 8 1.00 +9.8% rx-frames = 16 1.01 +10.9% rx-frames = 32 1.07 +17.5% rx-frames = 48 1.07 +17.5% rx-frames = 64 1.08 +18.6% rx-frames = 64 (no MSG_MORE) 0.91 +0% User were allowed to change per device batched packets through ethtool -C rx-frames. NAPI_POLL_WEIGHT were used as upper limitation to prevent bh from being disabled too long. Signed-off-by: Jason Wang <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/dsa/dsa.c')
0 files changed, 0 insertions, 0 deletions