From: Eric Dumazet <eric.dumazet@gmail.com>
To: Kevin Groeneveld <kgroeneveld@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] ppp: add 64 bit stats
Date: Tue, 24 Jul 2012 08:22:34 +0200 [thread overview]
Message-ID: <1343110954.2626.11040.camel@edumazet-glaptop> (raw)
In-Reply-To: <CABF+-6Vko_T2RCsk1KVouB8a+8Ms_aLEoA-Xet1nxB8bnZAxMA@mail.gmail.com>
On Mon, 2012-07-23 at 21:53 -0400, Kevin Groeneveld wrote:
> On Mon, Jul 23, 2012 at 11:59 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> >> Would proper synchronization in this case just be wrapping the updates
> >> in a spin_lock/spin_unlock?
> >
> > Would be fine (if the proper BH safe variant is used), or you could also
> > use atomic64_t.
>
> Which would you recommend, spin locks or atomic64_t?
>
> atomic64_t seems like it would be simpler.
Simpler but a bit more expensive when two counters are changed at the
same time.
(two atomic ops instead of a single one for the spinlock)
next prev parent reply other threads:[~2012-07-24 6:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-22 20:19 [PATCH] ppp: add 64 bit stats Kevin Groeneveld
2012-07-22 21:54 ` David Miller
2012-07-23 0:32 ` Kevin Groeneveld
2012-07-23 0:40 ` David Miller
2012-07-23 5:16 ` Eric Dumazet
2012-07-23 15:25 ` Kevin Groeneveld
2012-07-23 15:59 ` Eric Dumazet
2012-07-24 1:53 ` Kevin Groeneveld
2012-07-24 6:22 ` Eric Dumazet [this message]
2012-07-25 2:27 ` Kevin Groeneveld
2012-07-25 4:04 ` Eric Dumazet
2012-07-25 14:43 ` Kevin Groeneveld
2012-07-25 14:50 ` Eric Dumazet
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=1343110954.2626.11040.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