public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: "David S. Miller" <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH 3/9] veth: convert to 64 bit statistics
Date: Fri, 10 Jun 2011 17:34:19 +0100	[thread overview]
Message-ID: <1307723659.2815.9.camel@bwh-desktop> (raw)
In-Reply-To: <20110608202241.52ce68ae@nehalam.ftrdhcpuser.net>

On Wed, 2011-06-08 at 20:22 -0700, Stephen Hemminger wrote:
> On Thu, 09 Jun 2011 03:00:41 +0100
> Ben Hutchings <bhutchings@solarflare.com> wrote:
> 
> > On Wed, 2011-06-08 at 17:53 -0700, Stephen Hemminger wrote:
> > > Not much change, device was already keeping per cpu statistics.
> > > Use recent 64 statistics interface.
> > [...]
> > 
> > It's also going to need to use u64_stats_sync functions.
> > 
> > Ben.
> > 
> 
> No veth is doing per-cpu update therefore the new code has the same guarantee
> as the old code.

Per-cpu statistics avoid the problem of races between writers without
using expensive atomic operations.  They don't solve the problem of
races between writer and reader (on 32-bit systems).

For example, if veth_get_stats() races with a receive or transmit that
increments a value from 0x00000001ffffffff to 0x0000000200000000, it may
see the value as 0x00000002ffffffff.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


  reply	other threads:[~2011-06-10 16:34 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-09  0:53 [PATCH 0/9] 64 bit statistics for VM and 10G drivers Stephen Hemminger
2011-06-09  0:53 ` [PATCH 1/9] vmxnet3: convert to 64 bit stats interface Stephen Hemminger
2011-06-09  5:17   ` [Pv-drivers] " Scott Goldman
2011-06-09  0:53 ` [PATCH 2/9] xen: " Stephen Hemminger
2011-06-09  1:56   ` Ben Hutchings
2011-06-14 21:07     ` Konrad Rzeszutek Wilk
2011-06-15  8:38       ` [Xen-devel] " Ian Campbell
2011-06-09  0:53 ` [PATCH 3/9] veth: convert to 64 bit statistics Stephen Hemminger
2011-06-09  2:00   ` Ben Hutchings
2011-06-09  3:22     ` Stephen Hemminger
2011-06-10 16:34       ` Ben Hutchings [this message]
2011-06-09  6:26   ` David Miller
2011-06-09  0:54 ` [PATCH 4/9] ifb: convert to 64 bit stats Stephen Hemminger
2011-06-09  3:29   ` Eric Dumazet
2011-06-09  3:32     ` Stephen Hemminger
2011-06-09  3:37       ` Eric Dumazet
2011-06-09  0:54 ` [PATCH 5/9] netxen: convert to 64 bit statistics Stephen Hemminger
2011-06-09  6:13   ` Amit Salecha
2011-06-09  6:27   ` David Miller
2011-06-09  0:54 ` [PATCH 6/9] enic: update to support 64 bit stats Stephen Hemminger
2011-06-09  6:27   ` David Miller
2011-06-09 17:43   ` roprabhu
2011-06-09  0:54 ` [PATCH 7/9] myricom: update to " Stephen Hemminger
2011-06-09  6:27   ` David Miller
2011-06-09  0:54 ` [PATCH 8/9] niu: support 64 bit stats interface Stephen Hemminger
2011-06-09  6:27   ` David Miller
2011-06-09  0:54 ` [PATCH 9/9] s2io: implement 64 bit stats Stephen Hemminger
2011-06-09  1:52   ` Ben Hutchings

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1307723659.2815.9.camel@bwh-desktop \
    --to=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox