From: Eric Dumazet <eric.dumazet@gmail.com>
To: Kevin Groeneveld <kgroeneveld@gmail.com>
Cc: netdev@vger.kernel.org, Simon Horman <horms@verge.net.au>,
Julian Anastasov <ja@ssi.bg>,
Wensong Zhang <wensong@linux-vs.org>,
lvs-devel@vger.kernel.org
Subject: Re: [PATCH] b44: add 64 bit stats
Date: Sat, 21 Jul 2012 07:09:36 +0200 [thread overview]
Message-ID: <1342847376.2626.8162.camel@edumazet-glaptop> (raw)
In-Reply-To: <CABF+-6XGO0Qvqd1O-aY28kG1jV=L6eRcupnZpaimTunddPwL2A@mail.gmail.com>
On Fri, 2012-07-20 at 22:22 -0400, Kevin Groeneveld wrote:
> On Fri, Jul 20, 2012 at 2:56 PM, Kevin Groeneveld <kgroeneveld@gmail.com> wrote:
> >> In fact all network drivers should use the _bh version.
> >> Could you send a patch for all of them, based on net-next tree ?
> >
> > Sure, I can work on that. It should be a relatively easy thing to
> > update. I can probably send a patch within the next couple days.
>
> As I have been working on the patch I have been trying convince myself
> that each case I change actually needs the _bh version of the
> functions instead of blindly changing them. So far I have found the
> following where the change seems to make sense:
>
> drivers/net/dummy.c
> drivers/net/ethernet/neterion/vxge/vxge-main.c
> drivers/net/loopback.c
> drivers/net/virtio_net.c
> net/bridge/br_device.c
>
Thats right.
> The only two other places in the networking code that use
> u64_stats_fetch_begin/u64_stats_fetch_retry are:
>
> net/l2tp/l2tp_netlink.c
This one is completely buggy, dont waste your time on it.
My plan for this one : dont try to have 64bit stats on 32bit arches, and
use plain "unsigned long" counters (if they are percpu), or
atomic_long_t (if they are shared by all cpus)
The writer sides might be run concurrently by several cpus, so
u64_stats_update_begin(&sstats->syncp); are racy : a reader can
be trapped forever.
> net/netfilter/ipvs/ip_vs_est.c
>
Same problem for this one, I think.
I CCed ipvs maintainers so that they can take a look.
> Do these need to be updated as well? Looking at these files quickly
> and with my limited knowledge of the kernel I am not sure if they
> update the stats in a BH context or not.
>
>
> Kevin
Thanks !
next prev parent reply other threads:[~2012-07-21 5:09 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
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 [this message]
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=1342847376.2626.8162.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=horms@verge.net.au \
--cc=ja@ssi.bg \
--cc=kgroeneveld@gmail.com \
--cc=lvs-devel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=wensong@linux-vs.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