Re: [PATCH - RFC] [1/5] 64-bit network statistics - generic net

From: Bernd Eckenfels (
Date: Sat Jul 05 2003 - 14:58:20 EST

In article <> you wrote:
> If one cpu tries to read a u_int64_t variable while another tries to
> update it, the worst case scenario is that the reader will get the high
> 32-bits before the write, and low 32-bit after the write, now if the counter
> overflow, the number would be off by 4GB! (This only applies to 32-bit
> architectures.) True, there are cache coherency algorithms, etc...

a reader like ifconfig can easyly work around this with multiple tries, but
incremeting those variables wont work that easy, and therefore needs a lock,
which will be a major pita.

64bit counters should be a result of lockless per-cpu network counters
(32bit) with some kind of async merging.

Or we wait till 64bit hardware is more common :)


eckes privat -
Project Freefire -
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Jul 07 2003 - 22:00:25 EST