[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1307723659.2815.9.camel@bwh-desktop>
Date: Fri, 10 Jun 2011 17:34:19 +0100
From: Ben Hutchings <bhutchings@...arflare.com>
To: Stephen Hemminger <shemminger@...tta.com>
Cc: "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH 3/9] veth: convert to 64 bit statistics
On Wed, 2011-06-08 at 20:22 -0700, Stephen Hemminger wrote:
> On Thu, 09 Jun 2011 03:00:41 +0100
> Ben Hutchings <bhutchings@...arflare.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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists