From: Mark J Roberts <mjr@znex.org>
To: linux-kernel@vger.kernel.org
Subject: Annoying /proc/net/dev rollovers.
Date: Sun, 16 Feb 2003 16:16:16 -0600 [thread overview]
Message-ID: <20030216221616.GA246@znex> (raw)
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.
next reply other threads:[~2003-02-16 22:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-16 22:16 Mark J Roberts [this message]
2003-02-17 1:41 ` Annoying /proc/net/dev rollovers 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030216221616.GA246@znex \
--to=mjr@znex.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox