Eric Dumazet <[email protected]> wrote: > > > > > An advantage of retaining a spinlock in percpu_counter is that if accuracy > > is needed at a low rate (say, /proc reading) we can take the lock and then > > go spill each CPU's local count into the main one. It would need to be a > > very low rate though. Or we make the cpu-local counters atomic too. > > We might use atomic_long_t only (and no spinlocks) Yup, that's it. > Something like this ? > It'd be a lot neater if we had atomic_long_xchg(). - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- References:
- [patch 0/4] net: Percpufy frequently used variables on struct proto
- From: Ravikiran G Thirumalai <[email protected]>
- [patch 3/4] net: Percpufy frequently used variables -- proto.sockets_allocated
- From: Ravikiran G Thirumalai <[email protected]>
- Re: [patch 3/4] net: Percpufy frequently used variables -- proto.sockets_allocated
- From: Eric Dumazet <[email protected]>
- Re: [patch 3/4] net: Percpufy frequently used variables -- proto.sockets_allocated
- From: Ravikiran G Thirumalai <[email protected]>
- Re: [patch 3/4] net: Percpufy frequently used variables -- proto.sockets_allocated
- From: Andrew Morton <[email protected]>
- Re: [patch 3/4] net: Percpufy frequently used variables -- proto.sockets_allocated
- From: Ravikiran G Thirumalai <[email protected]>
- Re: [patch 3/4] net: Percpufy frequently used variables -- proto.sockets_allocated
- From: Eric Dumazet <[email protected]>
- Re: [patch 3/4] net: Percpufy frequently used variables -- proto.sockets_allocated
- From: Andrew Morton <[email protected]>
- Re: [patch 3/4] net: Percpufy frequently used variables -- proto.sockets_allocated
- From: Eric Dumazet <[email protected]>
- [patch 0/4] net: Percpufy frequently used variables on struct proto
- Prev by Date: Re: [patch 3/4] net: Percpufy frequently used variables -- proto.sockets_allocated
- Next by Date: Re: [patch 0/9] Critical Mempools
- Previous by thread: Re: [patch 3/4] net: Percpufy frequently used variables -- proto.sockets_allocated
- Next by thread: Re: [patch 3/4] net: Percpufy frequently used variables -- proto.sockets_allocated
- Index(es):