[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4FEB90C3.9050607@hp.com>
Date: Wed, 27 Jun 2012 16:01:23 -0700
From: Rick Jones <rick.jones2@...com>
To: Eric Dumazet <eric.dumazet@...il.com>
CC: Ben Greear <greearb@...delatech.com>,
Stephen Hemminger <shemminger@...tta.com>,
Tom Parkin <tparkin@...alix.com>, netdev@...r.kernel.org,
David.Laight@...LAB.COM, James Chapman <jchapman@...alix.com>
Subject: Re: [PATCH v2] l2tp: use per-cpu variables for u64_stats updates
On 06/27/2012 02:35 PM, Eric Dumazet wrote:
> On Wed, 2012-06-27 at 14:31 -0700, Ben Greear wrote:
>
>> For an example, see the VLAN code. rx-errors and tx-dropped are only 32-bit
>> counters. Now, in the real world, we wouldn't expect those counters to
>> increase at high rates, but they are still 32-bit counters masquerading
>> as 64, and they could wrap after a while, so any code that expected a wrap
>> to mean a 64-bit wrap would be wrong.
>>
>> At the time I was last complaining, there were lots more cases
>> of this that I was fighting with, but I don't recall exactly what they
>> were. Once my user-space code got paranoid enough, it was able to
>> at least mostly deal with 32 and 64 wraps.
>
> Good, you now know how to deal correctly with these things.
>
> Using 64bit fields for tx_dropped is what I call kernel bloat.
Today, sure, generalizing to packet counters in general, that bloat is
likely on its way. At 100 Gbit/s Ethernet, that is upwards of 147
million packets per second each way. At 1 GbE it is 125 million octets
per second. So, if 32 bit octet counters were insufficient for 1 GbE,
32 bit packet counters likely will be insufficient for 100GbE.
Or, I suppose, 3 or more bonded 40 GbEs or 10 or more bonded 10 GbEs
(unlikely though that last one may be) assuming there is stats
aggregation in the bond interface.
rick jones
--
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