[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160414.225617.2128747969495613941.davem@davemloft.net>
Date: Thu, 14 Apr 2016 22:56:17 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: pabeni@...hat.com
Cc: netdev@...r.kernel.org, mst@...hat.com, hannes@...essinduktion.org,
ebiederm@...ssion.com, gkurz@...ux.vnet.ibm.com,
jasowang@...hat.com
Subject: Re: [PATCH net-next] tun: use per cpu variables for stats
accounting
From: Paolo Abeni <pabeni@...hat.com>
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
> 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@...hat.com>
Ok this seems reasonable, applied, thanks.
I guess most applications use tuntap by having two threads, one
for transmit and one for receive processing?
Powered by blists - more mailing lists