diff options
| author | Dan Williams <dan.j.williams@intel.com> | 2009-09-08 14:32:24 -0700 |
|---|---|---|
| committer | Dan Williams <dan.j.williams@intel.com> | 2009-09-08 14:32:24 -0700 |
| commit | a348a7e6fdbcd2d5192a09719a479bb238fde727 (patch) | |
| tree | 5ff94185f4e5a810777469d7fe7832a8ec2d3430 /include/linux/kernel_stat.h | |
| parent | 808347f6a31792079e345ec865e9cfcb6e8ae6b2 (diff) | |
| parent | 28d0325ce6e0a52f53d8af687e6427fee59004d3 (diff) | |
Merge commit 'v2.6.31-rc1' into dmaengine
Diffstat (limited to 'include/linux/kernel_stat.h')
| -rw-r--r-- | include/linux/kernel_stat.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index 0c8b89f28a95..348fa8874b52 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h @@ -5,6 +5,7 @@ #include <linux/threads.h> #include <linux/percpu.h> #include <linux/cpumask.h> +#include <linux/interrupt.h> #include <asm/irq.h> #include <asm/cputime.h> @@ -31,6 +32,7 @@ struct kernel_stat { #ifndef CONFIG_GENERIC_HARDIRQS unsigned int irqs[NR_IRQS]; #endif + unsigned int softirqs[NR_SOFTIRQS]; }; DECLARE_PER_CPU(struct kernel_stat, kstat); @@ -67,6 +69,16 @@ extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu); #endif +static inline void kstat_incr_softirqs_this_cpu(unsigned int irq) +{ + kstat_this_cpu.softirqs[irq]++; +} + +static inline unsigned int kstat_softirqs_cpu(unsigned int irq, int cpu) +{ + return kstat_cpu(cpu).softirqs[irq]; +} + /* * Number of interrupts per specific IRQ source, since bootup */ @@ -81,7 +93,12 @@ static inline unsigned int kstat_irqs(unsigned int irq) return sum; } + +/* + * Lock/unlock the current runqueue - to extract task statistics: + */ extern unsigned long long task_delta_exec(struct task_struct *); + extern void account_user_time(struct task_struct *, cputime_t, cputime_t); extern void account_system_time(struct task_struct *, int, cputime_t, cputime_t); extern void account_steal_time(cputime_t); |
