Re: [PATCH net-next] tun: use per cpu variables for stats accounting

2016-04-15 Thread Paolo Abeni
On Thu, 2016-04-14 at 22:56 -0400, David Miller wrote: > From: Paolo Abeni > Date: Wed, 13 Apr 2016 10:52:20 +0200 > > > Currently the tun device accounting uses dev->stats without applying any > > kind of protection, regardless that accounting happens in preemptible > > process context. > > This

Re: [PATCH net-next] tun: use per cpu variables for stats accounting

2016-04-14 Thread David Miller
From: Paolo Abeni Date: Wed, 13 Apr 2016 10:52:20 +0200 > 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 >

[PATCH net-next] tun: use per cpu variables for stats accounting

2016-04-13 Thread Paolo Abeni
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