public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Kevin Groeneveld <kgroeneveld@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] b44: add 64 bit stats
Date: Fri, 20 Jul 2012 06:53:09 +0200	[thread overview]
Message-ID: <1342759989.2626.5472.camel@edumazet-glaptop> (raw)
In-Reply-To: <CABF+-6XVCTDZedzcp-gWACYpG9NLmZUdwW2zsXC8WNKWk3dE5w@mail.gmail.com>

On Thu, 2012-07-19 at 21:56 -0400, Kevin Groeneveld wrote:

> I am still trying to make sure I understand this fully.  I want to
> update some other drivers with 64 bit stats as well.  What you said
> seems to make sense, but...
> 
> I was looking at the virtio_net.c driver.  One spot in this driver
> which updates the stats is the receive_buf function.  recive_buf is
> called from virtnet_poll which is registered as a napi poll function.
> According to Documentation/networking/netdevices.txt the poll function
> is called in a softirq context.  However, the function which reads the
> stats uses u64_stats_fetch_begin/u64_stats_fetch_retry.  Shouldn't
> this be u64_stats_fetch_begin_bh/u64_stats_fetch_retry_bh for the
> exact reasons you described for my b44 patch?

Absolutely. You can argue that probably nobody use this driver on a
32bit UP machine, but technically speaking the current implementation is
racy.

  reply	other threads:[~2012-07-20  4:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-15  1:51 [PATCH] b44: add 64 bit stats Kevin Groeneveld
2012-07-15  7:26 ` Eric Dumazet
2012-07-15 17:51   ` Kevin Groeneveld
2012-07-15 18:00     ` [PATCH v2] " Kevin Groeneveld
2012-07-15 18:18       ` Eric Dumazet
2012-07-17  6:08       ` David Miller
2012-07-18  2:02         ` Kevin Groeneveld
2012-07-18  3:18           ` Eric Dumazet
2012-07-18  3:46         ` Kevin Groeneveld
2012-07-18  3:50           ` Eric Dumazet
2012-07-18 16:30             ` David Miller
2012-07-20  1:56   ` [PATCH] " Kevin Groeneveld
2012-07-20  4:53     ` Eric Dumazet [this message]
2012-07-20  5:24       ` Eric Dumazet
2012-07-20 14:33         ` Ben Hutchings
2012-07-20 15:12           ` Eric Dumazet
2012-07-20 18:56         ` Kevin Groeneveld
2012-07-21  2:22           ` Kevin Groeneveld
2012-07-21  5:09             ` Eric Dumazet
2012-07-21 10:12               ` Julian Anastasov
2012-07-21 16:36               ` Kevin Groeneveld

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=1342759989.2626.5472.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=kgroeneveld@gmail.com \
    --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