From: Nick Piggin <npiggin@suse.de>
To: David Miller <davem@davemloft.net>
Cc: eric.dumazet@gmail.com, netdev@vger.kernel.org,
bhutchings@solarflare.com
Subject: Re: [PATCH net-next-2.6] loopback: Implement 64bit stats on 32bit arches
Date: Tue, 15 Jun 2010 16:49:23 +1000 [thread overview]
Message-ID: <20100615064923.GF6138@laptop> (raw)
In-Reply-To: <20100614.231412.39191304.davem@davemloft.net>
On Mon, Jun 14, 2010 at 11:14:12PM -0700, David Miller wrote:
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Mon, 14 Jun 2010 17:59:22 +0200
>
> > Uses a seqcount_t to synchronize stat producer and consumer, for packets
> > and bytes counter, now u64 types.
> >
> > (dropped counter being rarely used, stay a native "unsigned long" type)
> >
> > No noticeable performance impact on x86, as it only adds two increments
> > per frame. It might be more expensive on arches where smp_wmb() is not
> > free.
> >
> > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
>
> Applied, but I suspect we might end up eventually needing to
> abstract this kind of technique in a common place so other
> spots can use it.
Check i_size stuff in include/linux/fs.h if you consider doing this.
And keep preempt in mind too. I assume you can't be preempted at this
point, but if you're prone to change the locking, it might be worth
the (small) cost of doing explicit preempt_disable() (and maybe to
help the sanity of the -rt guys too).
next prev parent reply other threads:[~2010-06-15 6:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-14 15:59 [PATCH net-next-2.6] loopback: Implement 64bit stats on 32bit arches Eric Dumazet
2010-06-15 6:14 ` David Miller
2010-06-15 6:49 ` Nick Piggin [this message]
2010-06-15 7:23 ` Eric Dumazet
2010-06-15 10:14 ` [PATCH net-next-2.6] net: Introduce u64_stats_sync infrastructure Eric Dumazet
2010-06-15 10:25 ` Nick Piggin
2010-06-15 10:43 ` Eric Dumazet
2010-06-15 11:04 ` Nick Piggin
2010-06-15 12:12 ` Eric Dumazet
2010-06-15 13:29 ` [PATCH net-next-2.6 v2] " Eric Dumazet
2010-06-22 17:24 ` David Miller
2010-06-22 17:31 ` Eric Dumazet
2010-06-15 10:39 ` [PATCH net-next-2.6] bridge: 64bit rx/tx counters Eric Dumazet
2010-06-22 17:25 ` David Miller
2010-08-10 4:47 ` Andrew Morton
2010-08-12 12:16 ` Eric Dumazet
2010-08-12 15:07 ` Andrew Morton
2010-08-12 21:47 ` Eric Dumazet
2010-08-12 22:11 ` Andrew Morton
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=20100615064923.GF6138@laptop \
--to=npiggin@suse.de \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@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 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.