[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABF+-6WHqzXhvv9etdAqsamZirbWxWJEsnU-CQ1H8tvynCTOZA@mail.gmail.com>
Date: Mon, 23 Jul 2012 11:25:53 -0400
From: Kevin Groeneveld <kgroeneveld@...il.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] ppp: add 64 bit stats
Hi Eric,
On Mon, Jul 23, 2012 at 1:16 AM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> Hmm. This patches adds races, but also adds a good amount of memory on
> these servers with thousand of ppp devices, and 64 cpus.
I am curious if you can elaborate on what is racy about the patch, I
am still trying to learn. I assumed (possibly incorrectly) that
because I was using percpu variables that the stats updates didn't
need any extra synchronization as any concurrent updates would be on
different cpus.
> I really doubt ppp is performance sensitive, it so doesnt need percpu
> counter.
>
> If you really want 64bits stats on ppp, use proper synchronization
> around u64 counters (but shared ones)
I will work on an updated patch without the percpu variables. I
didn't really think about servers with many cpus and many ppp sessions
when I created the patch, I was mainly thinking about my Linksys
router and other simple clients. Many of the other network drivers
use percpu variables for their stats so I just followed along.
Would proper synchronization in this case just be wrapping the updates
in a spin_lock/spin_unlock?
Kevin
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists