public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Annoying /proc/net/dev rollovers.
@ 2003-02-16 22:16 Mark J Roberts
  2003-02-17  1:41 ` Chris Wedgwood
  0 siblings, 1 reply; 8+ messages in thread
From: Mark J Roberts @ 2003-02-16 22:16 UTC (permalink / raw)
  To: linux-kernel

The rolling-over of /proc/net/dev fields annoys me.

I read a couple threads about the issue and saw a lot of whimpering
about how locking would be such a pain to implement in lieu of
32-bit atomicity.

Alan Cox pointed out in one of them that accurate info could be
collected through "the firewalling facilities", which I take to mean
the ipt_counters structure. The caveat is that it only provides
packet and byte counts.

One alternative to throwing locks around everything accessing those
fields is to update a 64-bit counter asynchronously. Has this been
considered? It would entail atomically executing

	total_rx_bytes += rx_bytes;
	rx_bytes = 0;

and merely ensuring that rx_bytes does not roll over between calls.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-02-18 13:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-16 22:16 Annoying /proc/net/dev rollovers Mark J Roberts
2003-02-17  1:41 ` Chris Wedgwood
2003-02-17  2:46   ` Mark J Roberts
2003-02-17  3:24     ` Jeff Garzik
2003-02-17  4:21     ` Chris Wedgwood
2003-02-17 10:35       ` Matti Aarnio
2003-02-18  4:58         ` David Lang
2003-02-18 13:28           ` Matti Aarnio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox