]> git.baikalelectronics.ru Git - kernel.git/commit
virtio-net: batch stats updating
authorJason Wang <jasowang@redhat.com>
Fri, 17 Feb 2017 03:33:09 +0000 (11:33 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 19 Feb 2017 23:15:23 +0000 (18:15 -0500)
commitf3f3744b8e2c8e24be257d3ceffc336c446efec0
tree70f3c92a8839438416ca67eb93f9760aa6ade34a
parente9988cabe894e148baffed13640109a69f6cbc57
virtio-net: batch stats updating

We already have counters for sent/recv packets and sent/recv bytes.
Doing a batched update to reduce the number of
u64_stats_update_begin/end().

Take care not to bother with stats update when called
speculatively.

Cc: Willem de Bruijn <willemb@google.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c