From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jamal Hadi Salim Subject: Re: [RFC net-next] net: sched: do not acquire qdisc spinlock in qdisc/class stats dump Date: Sun, 22 May 2016 12:35:07 -0400 Message-ID: <5741DFBB.8040003@mojatatu.com> References: <1463661320.18194.178.camel@edumazet-glaptop3.roam.corp.google.com> <1463712330.18194.261.camel@edumazet-glaptop3.roam.corp.google.com> <1463723432.18194.274.camel@edumazet-glaptop3.roam.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: netdev , John Fastabend , Kevin Athey , Xiaotian Pei To: Eric Dumazet , Cong Wang Return-path: Received: from mail-it0-f67.google.com ([209.85.214.67]:35016 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752384AbcEVQrn (ORCPT ); Sun, 22 May 2016 12:47:43 -0400 Received: by mail-it0-f67.google.com with SMTP id z123so2770090itg.2 for ; Sun, 22 May 2016 09:47:42 -0700 (PDT) In-Reply-To: <1463723432.18194.274.camel@edumazet-glaptop3.roam.corp.google.com> Sender: netdev-owner@vger.kernel.org List-ID: On 16-05-20 01:50 AM, Eric Dumazet wrote: > It wont be inaccurate (no drift), as the writers hold the qdisc > spinlock. > > It it the same with say IP/TCP SNMP counters : > > When an incoming frame is handled, it might change many SNMP counters, > but an SNMP agent might fetch the whole set of SNMP values in the middle > of the changes. > > IpInReceives > IpInDelivers > TcpInSegs > IpExtInOctets > IpExtInNoECTPkts > ... > > The only 'problem' can be a off-by-one (or off-by-bytes-in-the-packet) > transient error, that all SNMP agents are normally handling just fine. > I think qdisc stats being off by a bit are ok - hence the rcu suggestion. I would have problems with action stats being off (where they are used for billing). cheers, jamal