Re: [PATCH 04/10] lib: percpu_counter_mod64

2007-04-21 Thread Peter Zijlstra
On Sat, 2007-04-21 at 12:21 -0700, Andrew Morton wrote: > On Sat, 21 Apr 2007 13:02:26 +0200 Peter Zijlstra <[EMAIL PROTECTED]> wrote: > > > > > + cpu = get_cpu(); > > > > + pcount = per_cpu_ptr(fbc->counters, cpu); > > > > + count = *pcount + amount; > > > > + if (count >=

Re: [PATCH 04/10] lib: percpu_counter_mod64

2007-04-21 Thread Andrew Morton
On Sat, 21 Apr 2007 13:02:26 +0200 Peter Zijlstra <[EMAIL PROTECTED]> wrote: > > > + cpu = get_cpu(); > > > + pcount = per_cpu_ptr(fbc->counters, cpu); > > > + count = *pcount + amount; > > > + if (count >= FBC_BATCH || count <= -FBC_BATCH) { > > > + spin_lock(&fbc->lock); > > > +

Re: [PATCH 04/10] lib: percpu_counter_mod64

2007-04-21 Thread Peter Zijlstra
On Sat, 2007-04-21 at 02:55 -0700, Andrew Morton wrote: > On Fri, 20 Apr 2007 17:51:58 +0200 Peter Zijlstra <[EMAIL PROTECTED]> wrote: > > > Add percpu_counter_mod64() to allow large modifications. > > > > Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]> > > --- > > include/linux/percpu_counter

Re: [PATCH 04/10] lib: percpu_counter_mod64

2007-04-21 Thread Andrew Morton
On Fri, 20 Apr 2007 17:51:58 +0200 Peter Zijlstra <[EMAIL PROTECTED]> wrote: > Add percpu_counter_mod64() to allow large modifications. > > Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]> > --- > include/linux/percpu_counter.h |9 + > lib/percpu_counter.c | 28 +

[PATCH 04/10] lib: percpu_counter_mod64

2007-04-20 Thread Peter Zijlstra
Add percpu_counter_mod64() to allow large modifications. Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]> --- include/linux/percpu_counter.h |9 + lib/percpu_counter.c | 28 2 files changed, 37 insertions(+) Index: linux-2.6/include/linux/per