irq: make irqs in kernel stat use per_cpu_dyn_array
authorYinghai Lu <yhlu.kernel@gmail.com>
Wed, 20 Aug 2008 03:50:01 +0000 (20:50 -0700)
committerIngo Molnar <mingo@elte.hu>
Thu, 16 Oct 2008 14:52:08 +0000 (16:52 +0200)
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/kernel_stat.h
kernel/sched.c

index cf9f40a91c9c79837753956b135e49c9ec984630..fe1f7fe534b44b4951db80f06217f2095a064253 100644 (file)
@@ -28,7 +28,11 @@ struct cpu_usage_stat {
 
 struct kernel_stat {
        struct cpu_usage_stat   cpustat;
+#ifdef CONFIG_HAVE_DYN_ARRAY
+       unsigned int *irqs;
+#else
        unsigned int irqs[NR_IRQS];
+#endif
 };
 
 DECLARE_PER_CPU(struct kernel_stat, kstat);
index 6f230596bd0c1d21a2c68ffbff8207e93dcd65b5..b9d713781b5bba46dbe54c3ab62fa137c4a68970 100644 (file)
@@ -4048,9 +4048,12 @@ static inline void idle_balance(int cpu, struct rq *rq)
 #endif
 
 DEFINE_PER_CPU(struct kernel_stat, kstat);
-
 EXPORT_PER_CPU_SYMBOL(kstat);
 
+#ifdef CONFIG_HAVE_DYN_ARRAY
+DEFINE_PER_CPU_DYN_ARRAY_ADDR(per_cpu__kstat_irqs, per_cpu__kstat.irqs, sizeof(unsigned int), nr_irqs, sizeof(unsigned long), NULL);
+#endif
+
 /*
  * Return p->sum_exec_runtime plus any more ns on the sched_clock
  * that have not yet been banked in case the task is currently running.