Skip to contentSkip to conversation

define percpu_counter_batch when CONFIG_SMP is not set

PATCH In review Nikanth Karthikesan 2 participants 3 messages Feb 4, 2010 Per-CPU memory allocator

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 define percpu_counter_batch when CONFIG_SMP is not set

percpu_counter_batch is not defined if CONFIG_SMP is not set.

---

include/linux/percpu_counter.h +2 -0
index a7684a5..ff57cef 100644
@@ -83,6 +83,8 @@ struct percpu_counter {
 	s64 count;
 };
 
+#define percpu_counter_batch 2
+
 static inline int percpu_counter_init(struct percpu_counter *fbc, s64 amount)
 {
 	fbc->count = amount;
#1 lore raw
Quoted 1 line · On Thursday 04 February 2010 18:19:22 Nikanth Karthikesan wrote:

percpu_counter_batch is not defined if CONFIG_SMP is not set.

The patch "sched: cpuacct: Use bigger percpu counter batch values for stats counters" in tip (43f85eab1411905afe5db510fbf9841b516e7e6a) would fail to build without this if CONFIG_SMP is not set.

Thanks
Nikanth

#2 lore raw
Quoted 6 lines · Nikanth Karthikesan
Quoted 1 line · On Thursday 04 February 2010 18:19:22 Nikanth Karthikesan wrote:

percpu_counter_batch is not defined if CONFIG_SMP is not set.

The patch "sched: cpuacct: Use bigger percpu counter batch values for stats counters" in tip (43f85eab1411905afe5db510fbf9841b516e7e6a) would fail to build without this if CONFIG_SMP is not set.

Which is why it got reverted (e2dfc8a0356ee7e065bd5ec8a2ca0f9b61c2daef), Anton also posted a new version that actually does build on UP.