mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Sipek <jeffpc@optonline.net>
To: Jan-Benedict Glaw <jbglaw@lug-owl.de>,
	Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@digeo.com>,
	Dave Jones <davej@codemonkey.org.uk>,
	Jeff Garzik <jgarzik@pobox.com>,
	netdev@oss.sgi.com, Linus Torvalds <torvalds@osdl.org>
Subject: Re: [PATCH - RFC] [1/5] 64-bit network statistics - generic net
Date: Fri, 04 Jul 2003 13:57:19 -0400	[thread overview]
Message-ID: <200307041357.32871.jeffpc@optonline.net> (raw)
In-Reply-To: <20030704094745.GG29233@lug-owl.de>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 04 July 2003 05:47, Jan-Benedict Glaw wrote:
<snip>
> Well... I don't really like to break userspace, but why don't we simply
> make packet/traffic counters long long / u_int64_t? This way, we'd
> simply keep almost all drivers untouched and only need to fiddle with
> some sprints()/printk() statements?

I'm no hardware expert, however, that approach contains potential race 
condition - not a system critical one, but something we should be concerned 
about. 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...

> Really, how many programs use the current statistics? I'd prefer to
> modify them over adding strange patches like this one to the kernel...

I believe that on any kind of router some at some point in time would like to 
know the data transfered.

Jeff.

- -- 
Keyboard not found!
Press F1 to enter Setup
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/BcADwFP0+seVj/4RAq2TAKDS0oAnj0/PrCuPoxdQF0euBiy6LACeMHqk
gWJhwub4y0VtQmC/hcevJB4=
=RCSe
-----END PGP SIGNATURE-----


  reply	other threads:[~2003-07-04 17: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 [this message]
2003-07-05 19:58     ` Bernd Eckenfels
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=200307041357.32871.jeffpc@optonline.net \
    --to=jeffpc@optonline.net \
    --cc=akpm@digeo.com \
    --cc=davej@codemonkey.org.uk \
    --cc=jbglaw@lug-owl.de \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    --cc=torvalds@osdl.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®