aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-08-19 23:50:01 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-16 10:52:08 -0400
commitd17a55ded3393ad3878010bb3a8243a15a8d8df5 (patch)
tree782f135f3ec8868cde9959d1670a463b45e3b24c
parentfa42d10dd5e1ff373061c0526f272106512301f9 (diff)
irq: make irqs in kernel stat use per_cpu_dyn_array
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--include/linux/kernel_stat.h4
-rw-r--r--kernel/sched.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h
index cf9f40a91c9c..fe1f7fe534b4 100644
--- a/include/linux/kernel_stat.h
+++ b/include/linux/kernel_stat.h
@@ -28,7 +28,11 @@ struct cpu_usage_stat {
28 28
29struct kernel_stat { 29struct kernel_stat {
30 struct cpu_usage_stat cpustat; 30 struct cpu_usage_stat cpustat;
31#ifdef CONFIG_HAVE_DYN_ARRAY
32 unsigned int *irqs;
33#else
31 unsigned int irqs[NR_IRQS]; 34 unsigned int irqs[NR_IRQS];
35#endif
32}; 36};
33 37
34DECLARE_PER_CPU(struct kernel_stat, kstat); 38DECLARE_PER_CPU(struct kernel_stat, kstat);
diff --git a/kernel/sched.c b/kernel/sched.c
index 6f230596bd0c..b9d713781b5b 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4048,9 +4048,12 @@ static inline void idle_balance(int cpu, struct rq *rq)
4048#endif 4048#endif
4049 4049
4050DEFINE_PER_CPU(struct kernel_stat, kstat); 4050DEFINE_PER_CPU(struct kernel_stat, kstat);
4051
4052EXPORT_PER_CPU_SYMBOL(kstat); 4051EXPORT_PER_CPU_SYMBOL(kstat);
4053 4052
4053#ifdef CONFIG_HAVE_DYN_ARRAY
4054DEFINE_PER_CPU_DYN_ARRAY_ADDR(per_cpu__kstat_irqs, per_cpu__kstat.irqs, sizeof(unsigned int), nr_irqs, sizeof(unsigned long), NULL);
4055#endif
4056
4054/* 4057/*
4055 * Return p->sum_exec_runtime plus any more ns on the sched_clock 4058 * Return p->sum_exec_runtime plus any more ns on the sched_clock
4056 * that have not yet been banked in case the task is currently running. 4059 * that have not yet been banked in case the task is currently running.