Re: [patch 3/4] net: Percpufy frequently used variables --proto.sockets_allocated
From: Andrew Morton
Date: Fri Jan 27 2006 - 19:39:38 EST
Eric Dumazet <dada1@xxxxxxxxxxxxx> 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/