From: Chris Friesen <cfriesen@nortelnetworks.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: "David S. Miller" <davem@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: 64 bit netdev stats counter
Date: Fri, 12 Jul 2002 18:31:03 -0400 [thread overview]
Message-ID: <3D2F58A7.6CC58590@nortelnetworks.com> (raw)
In-Reply-To: 1026516053.9958.33.camel@irongate.swansea.linux.org.uk
Alan Cox wrote:
>
> On Fri, 2002-07-12 at 22:58, David S. Miller wrote:
> > 32-bit values aren't atomic either, what is the issue?
> > We don't use atomic_t ops on these counters so they aren't
> > guarenteed in any way right now even. GCC is going to
> > output "incl MEM" or similar for net_stats->counter++, since
> > it lacks the 'lock;' prefix it is not atomic.
>
> The behaviour is quite different though. On a 32bit counter the worst we
> do is lose a few counts. On a 64bit one on 32bit cpus its quite likely
> gcc will output
>
> increment low 32bit
> if zero
> increment high
>
> Which means we can rapidly get 2^32 out of sync
Isn't this the same as 32-bit counters on a machine that doesn't do atomic
32-bit ops? Although in that case you could only be 2^16 off...
Chris
--
Chris Friesen | MailStop: 043/33/F10
Nortel Networks | work: (613) 765-0557
3500 Carling Avenue | fax: (613) 765-2986
Nepean, ON K2H 8E9 Canada | email: cfriesen@nortelnetworks.com
next prev parent reply other threads:[~2002-07-12 22:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1026503694.26819.4.camel@dell_ss3.pdx.osdl.net>
2002-07-12 22:02 ` 64 bit netdev stats counter Matt Stegman
2002-07-12 21:58 ` David S. Miller
2002-07-12 23:20 ` Alan Cox
2002-07-12 22:06 ` David S. Miller
2002-07-12 22:27 ` Andrew Morton
2002-07-12 22:28 ` David S. Miller
2002-07-12 22:31 ` Chris Friesen [this message]
2002-07-13 2:18 ` Alan Cox
2002-07-13 0:50 ` kuznet
2002-07-12 19:12 Matt Stegman
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=3D2F58A7.6CC58590@nortelnetworks.com \
--to=cfriesen@nortelnetworks.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=davem@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.