Re: [PATCH v2] l2tp: use per-cpu variables for u64_stats updates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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@xxxxxxxxxxxxxxx
More majordomo info at

[Linux Kernel Discussion]     [Ethernet Bridging]     [Linux Wireless Networking]     [Linux Bluetooth Networking]     [Linux Networking Users]     [VLAN]     [Git]     [IETF Annouce]     [Linux Assembly]     [Security]     [Bugtraq]     [Photo]     [Singles Social Networking]     [Yosemite Information]     [MIPS Linux]     [ARM Linux Kernel]     [ARM Linux]     [Linux Virtualization]     [Linux Security]     [Linux IDE]     [Linux RAID]     [Linux SCSI]     [Free Dating]

Add to Google Powered by Linux