]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - include/linux/percpu_counter.h
percpu_counter: FBC_BATCH should be a variable
[mirror_ubuntu-zesty-kernel.git] / include / linux / percpu_counter.h
index 9007ccdfc1127cfe73db03e31dd82a843f8f4fa8..99de7a31bab8c25673f3870959f016f5fa69a324 100644 (file)
@@ -24,11 +24,7 @@ struct percpu_counter {
        s32 *counters;
 };
 
-#if NR_CPUS >= 16
-#define FBC_BATCH      (NR_CPUS*2)
-#else
-#define FBC_BATCH      (NR_CPUS*4)
-#endif
+extern int percpu_counter_batch;
 
 int percpu_counter_init(struct percpu_counter *fbc, s64 amount);
 int percpu_counter_init_irq(struct percpu_counter *fbc, s64 amount);
@@ -39,7 +35,7 @@ s64 __percpu_counter_sum(struct percpu_counter *fbc);
 
 static inline void percpu_counter_add(struct percpu_counter *fbc, s64 amount)
 {
-       __percpu_counter_add(fbc, amount, FBC_BATCH);
+       __percpu_counter_add(fbc, amount, percpu_counter_batch);
 }
 
 static inline s64 percpu_counter_sum_positive(struct percpu_counter *fbc)