diff options
author | Paolo Abeni <pabeni@redhat.com> | 2016-04-13 10:52:20 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-14 22:55:25 -0400 |
commit | 608b9977260f67d8b032ea170666a6174a48e2f1 (patch) | |
tree | aff52e194edf2b83aebf0c668741c070094430cf /net/unix/af_unix.c | |
parent | 548aacdd742b963983f13c523dad8c169c406a19 (diff) | |
download | linux-608b9977260f67d8b032ea170666a6174a48e2f1.tar.gz linux-608b9977260f67d8b032ea170666a6174a48e2f1.tar.xz |
tun: use per cpu variables for stats accounting
Currently the tun device accounting uses dev->stats without applying any
kind of protection, regardless that accounting happens in preemptible
process context.
This patch move the tun stats to a per cpu data structure, and protect
the updates with u64_stats_update_begin()/u64_stats_update_end() or
this_cpu_inc according to the stat type. The per cpu stats are
aggregated by the newly added ndo_get_stats64 ops.
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions