mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bernd Eckenfels <ecki@calista.eckenfels.6bone.ka-ip.net>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH - RFC] [1/5] 64-bit network statistics - generic net
Date: Sat, 05 Jul 2003 21:58:20 +0200	[thread overview]
Message-ID: <E19YtAq-0006Xf-00@calista.inka.de> (raw)
In-Reply-To: <200307041357.32871.jeffpc@optonline.net>

In article <200307041357.32871.jeffpc@optonline.net> 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 :)

Greetings
Bernd
-- 
eckes privat - http://www.eckes.org/
Project Freefire - http://www.freefire.org/

  reply	other threads:[~2003-07-05 19:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-04  2:31 Jeff Sipek
2003-07-04  2:46 ` Jeff Garzik
2003-07-04  6:02   ` Jeff Sipek
2003-07-04  3:08 ` Linus Torvalds
2003-07-04  5:27   ` Jeff Sipek
2003-07-04  7:05   ` bert hubert
2003-07-05 18:49   ` Jeff Sipek
2003-07-05 21:46     ` Ben Greear
2003-07-04  9:47 ` Jan-Benedict Glaw
2003-07-04 17:57   ` Jeff Sipek
2003-07-05 19:58     ` Bernd Eckenfels [this message]
2003-07-05 20:37       ` Jeff Sipek
2003-07-05 20:40         ` Jeff Garzik
2003-07-05 20:59           ` Jeff Sipek
2003-07-05 21:51             ` Francois Romieu
2003-07-05 22:39               ` Jeff Sipek
2003-07-05 23:44                 ` Francois Romieu
2003-07-05 22:54               ` Roland Dreier
2003-07-05 21:41           ` Ben Greear
2003-07-06  7:27             ` Alan Cox

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=E19YtAq-0006Xf-00@calista.inka.de \
    --to=ecki@calista.eckenfels.6bone.ka-ip.net \
    --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

all inboxes | Powered by JetHome®