[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1501868592.25002.47.camel@edumazet-glaptop3.roam.corp.google.com>
Date: Fri, 04 Aug 2017 10:43:12 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Florian Fainelli <f.fainelli@...il.com>
Cc: netdev@...r.kernel.org, davem@...emlot.net,
Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...oirfairelinux.com>,
"David S. Miller" <davem@...emloft.net>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next] net: dsa: User per-cpu 64-bit statistics
On Fri, 2017-08-04 at 10:11 -0700, Eric Dumazet wrote:
> You could add a debug version of u64_stats_update_begin()
>
> doing
>
> int ret = atomic_inc((atomic_t *)syncp);
I meant atomic_inc_return() of course.
>
> BUG_ON(ret & 1);
>
>
> And u64_stats_update_end()
>
> int ret = atomic_inc((atomic_t *)syncp);
>
> BUG_ON(!(ret & 1));
>
>
> We probably could have a CONFIG_DEBUG_U64_STATS that could be used on
> 64bit kernels as well...
>
>
>
Powered by blists - more mailing lists