Eric Dumazet 179f7ebff6 percpu_counter: FBC_BATCH should be a variable
For NR_CPUS >= 16 values, FBC_BATCH is 2*NR_CPUS

Considering more and more distros are using high NR_CPUS values, it makes
sense to use a more sensible value for FBC_BATCH, and get rid of NR_CPUS.

A sensible value is 2*num_online_cpus(), with a minimum value of 32 (This
minimum value helps branch prediction in __percpu_counter_add())

We already have a hotcpu notifier, so we can adjust FBC_BATCH dynamically.

We rename FBC_BATCH to percpu_counter_batch since its not a constant
anymore.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-06 15:59:13 -08:00
..
2008-07-25 10:53:26 -07:00
2008-02-03 17:48:52 +02:00
2005-10-18 08:26:15 -07:00
2007-05-11 05:38:25 -04:00
2008-07-24 10:47:33 -07:00
2008-06-06 11:29:10 -07:00
2007-07-16 09:05:50 -07:00
2007-07-17 10:23:04 -07:00
2006-06-25 10:01:20 -07:00
2008-02-03 17:48:52 +02:00
2005-04-16 15:20:36 -07:00
2006-06-25 10:01:20 -07:00
2007-05-10 18:24:13 +02:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2009-01-06 15:59:11 -08:00
2009-01-01 10:12:19 +10:30
2008-04-29 08:11:16 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2008-05-14 19:11:14 -07:00
2007-10-19 11:53:41 -07:00
2008-12-10 13:34:33 -08:00
2006-06-20 20:24:58 -07:00
2008-07-26 12:00:07 -07:00
2006-10-06 08:53:40 -07:00
2008-07-26 12:00:07 -07:00
2008-01-24 20:40:05 -08:00
2009-01-01 10:12:19 +10:30
2008-07-26 12:00:07 -07:00
2005-04-16 15:20:36 -07:00
2008-07-30 16:29:19 -07:00
2008-01-30 13:33:00 +01:00
2008-07-26 12:00:10 -07:00
2007-10-17 08:42:52 -07:00
2008-07-26 12:00:10 -07:00
2008-07-22 19:24:31 +10:00
2009-01-06 15:59:12 -08:00