From: Eric Dumazet <eric.dumazet@gmail.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: Ben Greear <greearb@candelatech.com>,
David Miller <davem@davemloft.net>,
Patrick McHardy <kaber@trash.net>,
netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH] macvlan: lockless tx path
Date: Wed, 10 Nov 2010 22:12:35 +0100 [thread overview]
Message-ID: <1289423555.17691.8.camel@edumazet-laptop> (raw)
In-Reply-To: <1289423056.2249.7.camel@achroite.uk.solarflarecom.com>
Le mercredi 10 novembre 2010 à 21:04 +0000, Ben Hutchings a écrit :
> Drivers should calculate differences and accumulate them in a 64-bit
> counter. (A lot of hardware has read-to-clear counters anyway, in which
> case the driver *has* to accumulate the values it reads.)
You are mistaken. These are _hardware_ counters. If they were software,
of course they would be 32 or 64 bit.
And doing the thing you describe in software is racy.
I tried to remove many races, not to add new ones.
Yes, some drivers read one hardware counter using two instructions, and
this is racy.
next prev parent reply other threads:[~2010-11-10 21:12 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-10 15:41 [PATCH] macvlan: lockless tx path Eric Dumazet
2010-11-10 17:39 ` Ben Greear
2010-11-10 17:43 ` Eric Dumazet
2010-11-10 17:53 ` Ben Greear
2010-11-10 18:18 ` Eric Dumazet
2010-11-10 18:40 ` Ben Greear
2010-11-10 20:33 ` Eric Dumazet
2010-11-10 21:04 ` Ben Hutchings
2010-11-10 21:12 ` Eric Dumazet [this message]
2010-11-10 21:53 ` Ben Hutchings
2010-11-10 21:35 ` Ben Greear
2010-11-10 22:21 ` Eric Dumazet
2010-11-10 22:53 ` Ben Greear
2010-11-10 23:24 ` Eric Dumazet
2010-11-10 23:36 ` Eric Dumazet
2010-11-10 23:46 ` Ben Greear
2010-11-11 7:03 ` Eric Dumazet
2010-11-11 16:40 ` Ben Greear
2010-11-11 16:56 ` Eric Dumazet
2010-11-11 17:20 ` Ben Greear
2010-11-11 18:02 ` Eric Dumazet
2010-11-11 18:13 ` Ben Greear
2010-11-11 18:46 ` Eric Dumazet
2010-11-11 7:14 ` [PATCH net-next-2.6 v2] " Eric Dumazet
2010-11-12 8:20 ` Patrick McHardy
2010-11-16 18:59 ` David Miller
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=1289423555.17691.8.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=greearb@candelatech.com \
--cc=kaber@trash.net \
--cc=netdev@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