Re: [PATCH net-next] net: dsa: User per-cpu 64-bit statistics

2017-08-22 Thread Eric Dumazet
On Mon, 2017-08-21 at 17:10 -0700, Florian Fainelli wrote: > Well if we return 1 from atomic_inc_return() and the previous value was > zero, of course we are going to be bugging here. The idea behind the > patch I suppose is to make sure that we always get an odd number upon >

Re: [PATCH net-next] net: dsa: User per-cpu 64-bit statistics

2017-08-22 Thread Eric Dumazet
On Mon, 2017-08-21 at 17:10 -0700, Florian Fainelli wrote: > Well if we return 1 from atomic_inc_return() and the previous value was > zero, of course we are going to be bugging here. The idea behind the > patch I suppose is to make sure that we always get an odd number upon >

Re: [PATCH net-next] net: dsa: User per-cpu 64-bit statistics

2017-08-21 Thread Florian Fainelli
On 08/21/2017 04:23 PM, Florian Fainelli wrote: > On 08/04/2017 10:11 AM, Eric Dumazet wrote: >> On Fri, 2017-08-04 at 08:51 -0700, Florian Fainelli wrote: >>> On 08/03/2017 10:36 PM, Eric Dumazet wrote: On Thu, 2017-08-03 at 21:33 -0700, Florian Fainelli wrote: > During testing with a

Re: [PATCH net-next] net: dsa: User per-cpu 64-bit statistics

2017-08-21 Thread Florian Fainelli
On 08/21/2017 04:23 PM, Florian Fainelli wrote: > On 08/04/2017 10:11 AM, Eric Dumazet wrote: >> On Fri, 2017-08-04 at 08:51 -0700, Florian Fainelli wrote: >>> On 08/03/2017 10:36 PM, Eric Dumazet wrote: On Thu, 2017-08-03 at 21:33 -0700, Florian Fainelli wrote: > During testing with a

Re: [PATCH net-next] net: dsa: User per-cpu 64-bit statistics

2017-08-21 Thread Florian Fainelli
On 08/04/2017 10:11 AM, Eric Dumazet wrote: > On Fri, 2017-08-04 at 08:51 -0700, Florian Fainelli wrote: >> On 08/03/2017 10:36 PM, Eric Dumazet wrote: >>> On Thu, 2017-08-03 at 21:33 -0700, Florian Fainelli wrote: During testing with a background iperf pushing 1Gbit/sec worth of traffic

Re: [PATCH net-next] net: dsa: User per-cpu 64-bit statistics

2017-08-21 Thread Florian Fainelli
On 08/04/2017 10:11 AM, Eric Dumazet wrote: > On Fri, 2017-08-04 at 08:51 -0700, Florian Fainelli wrote: >> On 08/03/2017 10:36 PM, Eric Dumazet wrote: >>> On Thu, 2017-08-03 at 21:33 -0700, Florian Fainelli wrote: During testing with a background iperf pushing 1Gbit/sec worth of traffic

Re: [PATCH net-next] net: dsa: User per-cpu 64-bit statistics

2017-08-06 Thread David Miller
From: Florian Fainelli Date: Thu, 3 Aug 2017 21:33:27 -0700 > During testing with a background iperf pushing 1Gbit/sec worth of > traffic and having both ifconfig and ethtool collect statistics, we > could see quite frequent deadlocks. Convert the often accessed DSA slave

Re: [PATCH net-next] net: dsa: User per-cpu 64-bit statistics

2017-08-06 Thread David Miller
From: Florian Fainelli Date: Thu, 3 Aug 2017 21:33:27 -0700 > During testing with a background iperf pushing 1Gbit/sec worth of > traffic and having both ifconfig and ethtool collect statistics, we > could see quite frequent deadlocks. Convert the often accessed DSA slave > network devices

Re: [PATCH net-next] net: dsa: User per-cpu 64-bit statistics

2017-08-04 Thread Eric Dumazet
On Fri, 2017-08-04 at 10:11 -0700, Eric Dumazet wrote: > You could add a debug version of u64_stats_update_begin() > > doing > > int ret = atomic_inc((atomic_t *)syncp); I meant atomic_inc_return() of course. > > BUG_ON(ret & 1); > > > And u64_stats_update_end() > > int ret =

Re: [PATCH net-next] net: dsa: User per-cpu 64-bit statistics

2017-08-04 Thread Eric Dumazet
On Fri, 2017-08-04 at 10:11 -0700, Eric Dumazet wrote: > You could add a debug version of u64_stats_update_begin() > > doing > > int ret = atomic_inc((atomic_t *)syncp); I meant atomic_inc_return() of course. > > BUG_ON(ret & 1); > > > And u64_stats_update_end() > > int ret =

Re: [PATCH net-next] net: dsa: User per-cpu 64-bit statistics

2017-08-04 Thread Eric Dumazet
On Fri, 2017-08-04 at 08:51 -0700, Florian Fainelli wrote: > On 08/03/2017 10:36 PM, Eric Dumazet wrote: > > On Thu, 2017-08-03 at 21:33 -0700, Florian Fainelli wrote: > >> During testing with a background iperf pushing 1Gbit/sec worth of > >> traffic and having both ifconfig and ethtool collect

Re: [PATCH net-next] net: dsa: User per-cpu 64-bit statistics

2017-08-04 Thread Eric Dumazet
On Fri, 2017-08-04 at 08:51 -0700, Florian Fainelli wrote: > On 08/03/2017 10:36 PM, Eric Dumazet wrote: > > On Thu, 2017-08-03 at 21:33 -0700, Florian Fainelli wrote: > >> During testing with a background iperf pushing 1Gbit/sec worth of > >> traffic and having both ifconfig and ethtool collect

Re: [PATCH net-next] net: dsa: User per-cpu 64-bit statistics

2017-08-04 Thread Florian Fainelli
On 08/03/2017 10:36 PM, Eric Dumazet wrote: > On Thu, 2017-08-03 at 21:33 -0700, Florian Fainelli wrote: >> During testing with a background iperf pushing 1Gbit/sec worth of >> traffic and having both ifconfig and ethtool collect statistics, we >> could see quite frequent deadlocks. Convert the

Re: [PATCH net-next] net: dsa: User per-cpu 64-bit statistics

2017-08-04 Thread Florian Fainelli
On 08/03/2017 10:36 PM, Eric Dumazet wrote: > On Thu, 2017-08-03 at 21:33 -0700, Florian Fainelli wrote: >> During testing with a background iperf pushing 1Gbit/sec worth of >> traffic and having both ifconfig and ethtool collect statistics, we >> could see quite frequent deadlocks. Convert the

Re: [PATCH net-next] net: dsa: User per-cpu 64-bit statistics

2017-08-03 Thread Eric Dumazet
On Thu, 2017-08-03 at 21:33 -0700, Florian Fainelli wrote: > During testing with a background iperf pushing 1Gbit/sec worth of > traffic and having both ifconfig and ethtool collect statistics, we > could see quite frequent deadlocks. Convert the often accessed DSA slave > network devices

Re: [PATCH net-next] net: dsa: User per-cpu 64-bit statistics

2017-08-03 Thread Eric Dumazet
On Thu, 2017-08-03 at 21:33 -0700, Florian Fainelli wrote: > During testing with a background iperf pushing 1Gbit/sec worth of > traffic and having both ifconfig and ethtool collect statistics, we > could see quite frequent deadlocks. Convert the often accessed DSA slave > network devices

[PATCH net-next] net: dsa: User per-cpu 64-bit statistics

2017-08-03 Thread Florian Fainelli
During testing with a background iperf pushing 1Gbit/sec worth of traffic and having both ifconfig and ethtool collect statistics, we could see quite frequent deadlocks. Convert the often accessed DSA slave network devices statistics to per-cpu 64-bit statistics to remove these deadlocks and

[PATCH net-next] net: dsa: User per-cpu 64-bit statistics

2017-08-03 Thread Florian Fainelli
During testing with a background iperf pushing 1Gbit/sec worth of traffic and having both ifconfig and ethtool collect statistics, we could see quite frequent deadlocks. Convert the often accessed DSA slave network devices statistics to per-cpu 64-bit statistics to remove these deadlocks and