Messages in this thread | | | Date | Thu, 3 Jul 2003 20:08:03 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: [PATCH - RFC] [1/5] 64-bit network statistics - generic net |
| |
On Thu, 3 Jul 2003, Jeff Sipek wrote: > > The variables for network statistics (in struct net_device_stats) are unsigned > longs. On 32-bit architectures, this makes them overflow every 4GB or 2^32 > packets. The following series of patches [against 2.5.74] makes the > statistics variable type configurable. The default is to leave everything the > way it was (unsigned long). However, when NETSTATS64 is set in the config, > the statistics use 64-bit variables (u_int64_t) - this works only on 32-bit > architectures.
Please do this in user space. The "overflow every 2^32 packets" thing is _not_ a problem, if you just gather the statistics at any kind of reasonable interval.
I'd hate to penalise performance for something like this. We have generally avoided locking _entirely_ for statistics, exactly because people felt that there are major performance issues wrt network packet handling, and that "perfect statistics" aren't important enough to penalize performance over.
Remember: "perfect is the enemy of good".
Linus
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |