Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1703676

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

From Eric Dumazet <eric.dumazet@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH net-next] net: dsa: User per-cpu 64-bit statistics
Date 2017-08-04 07:40 +0200
Message-ID <uaDv3-2OP-5@gated-at.bofh.it> (permalink)
References <uaCz0-2b0-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 statistics to per-cpu 64-bit statistics to remove these
> deadlocks and provide fast efficient statistics updates.
> 

This seems to be a bug fix, it would be nice to get a proper tag like :

Fixes: f613ed665bb3 ("net: dsa: Add support for 64-bit statistics")

Problem here is that if multiple cpus can call dsa_switch_rcv() at the
same time, then u64_stats_update_begin() contract is not respected.

include/linux/u64_stats_sync.h states :

 * Usage :
 *
 * Stats producer (writer) should use following template granted it already got
 * an exclusive access to counters (a lock is already taken, or per cpu
 * data is used [in a non preemptable context])
 *
 *   spin_lock_bh(...) or other synchronization to get exclusive access
 *   ...
 *   u64_stats_update_begin(&stats->syncp);

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH net-next] net: dsa: User per-cpu 64-bit statistics Florian Fainelli <f.fainelli@gmail.com> - 2017-08-04 06:40 +0200
  Re: [PATCH net-next] net: dsa: User per-cpu 64-bit statistics Eric Dumazet <eric.dumazet@gmail.com> - 2017-08-04 07:40 +0200
    Re: [PATCH net-next] net: dsa: User per-cpu 64-bit statistics Florian Fainelli <f.fainelli@gmail.com> - 2017-08-04 18:00 +0200
      Re: [PATCH net-next] net: dsa: User per-cpu 64-bit statistics Eric Dumazet <eric.dumazet@gmail.com> - 2017-08-04 19:20 +0200
        Re: [PATCH net-next] net: dsa: User per-cpu 64-bit statistics Eric Dumazet <eric.dumazet@gmail.com> - 2017-08-04 19:50 +0200
  Re: [PATCH net-next] net: dsa: User per-cpu 64-bit statistics David Miller <davem@davemloft.net> - 2017-08-07 06:30 +0200

csiph-web