summaryrefslogtreecommitdiff
path: root/drivers/net/tun.c
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2018-11-15 17:43:09 +0800
committerDavid S. Miller <davem@davemloft.net>2018-11-17 12:00:42 -0800
commite4dab1e6ea64376ebd3b59281ecaaeb788116be3 (patch)
tree2f1e7d1b6ff105cec5ebcf0f1808ff7da72f9543 /drivers/net/tun.c
parentb8b9618a4f6a6660cb1ff44dd401a4b21f2caf6c (diff)
downloadlwn-e4dab1e6ea64376ebd3b59281ecaaeb788116be3.tar.gz
lwn-e4dab1e6ea64376ebd3b59281ecaaeb788116be3.zip
vhost_net: mitigate page reference counting during page frag refill
We do a get_page() which involves a atomic operation. This patch tries to mitigate a per packet atomic operation by maintaining a reference bias which is initially USHRT_MAX. Each time a page is got, instead of calling get_page() we decrease the bias and when we find it's time to use a new page we will decrease the bias at one time through __page_cache_drain_cache(). Testpmd(virtio_user + vhost_net) + XDP_DROP on TAP shows about 1.6% improvement. Before: 4.63Mpps After: 4.71Mpps Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tun.c')
0 files changed, 0 insertions, 0 deletions