Re: mmotm 2010-01-28-01-36 uploaded (sched.c + percpu)

From: Randy Dunlap
Date: Fri Jan 29 2010 - 12:37:41 EST

On 01/28/10 15:41, Anton Blanchard wrote:

Hi Randy,

when CONFIG_SMP is not enabled:

kernel/sched.c:10915: error: 'percpu_counter_batch' undeclared (first use in this function)

Did 1/2 make it into mmotm?

I only see one patch from you in mmotm.



[PATCH 1/2] percpu_counter: Make __percpu_counter_add an inline function on UP

Even though batch isn't used on UP, we may want to pass one in to keep the
SMP and UP code paths similar. Convert __percpu_counter_add to an inline
function so we wont get variable unused warnings if we do.

Signed-off-by: Anton Blanchard<anton@xxxxxxxxx>

diff --git a/include/linux/percpu_counter.h b/include/linux/percpu_counter.h
index a7684a5..794662b 100644
--- a/include/linux/percpu_counter.h
+++ b/include/linux/percpu_counter.h
@@ -98,9 +98,6 @@ static inline void percpu_counter_set(struct percpu_counter *fbc, s64 amount)
fbc->count = amount;

-#define __percpu_counter_add(fbc, amount, batch) \
- percpu_counter_add(fbc, amount)
static inline void
percpu_counter_add(struct percpu_counter *fbc, s64 amount)
@@ -109,6 +106,12 @@ percpu_counter_add(struct percpu_counter *fbc, s64 amount)

+static inline void
+__percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch)
+ percpu_counter_add(fbc, amount);
static inline s64 percpu_counter_read(struct percpu_counter *fbc)
return fbc->count;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at