diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-27 21:42:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-27 21:42:52 -0400 |
commit | 17bb51d56cdc8cbf252031db3107de034cfeb44c (patch) | |
tree | f9fb2c16b29a152d3413fa0028e660e3b6146584 /include/linux/kernel_stat.h | |
parent | 0671b7674f42ab3a200401ea0e48d6f47d34acae (diff) | |
parent | 95aac7b1cd224f568fb83937044cd303ff11b029 (diff) |
Merge branch 'akpm-incoming-2'
* akpm-incoming-2: (139 commits)
epoll: make epoll_wait() use the hrtimer range feature
select: rename estimate_accuracy() to select_estimate_accuracy()
Remove duplicate includes from many files
ramoops: use the platform data structure instead of module params
kernel/resource.c: handle reinsertion of an already-inserted resource
kfifo: fix kfifo_alloc() to return a signed int value
w1: don't allow arbitrary users to remove w1 devices
alpha: remove dma64_addr_t usage
mips: remove dma64_addr_t usage
sparc: remove dma64_addr_t usage
fuse: use release_pages()
taskstats: use real microsecond granularity for CPU times
taskstats: split fill_pid function
taskstats: separate taskstats commands
delayacct: align to 8 byte boundary on 64-bit systems
delay-accounting: reimplement -c for getdelays.c to report information on a target command
namespaces Kconfig: move namespace menu location after the cgroup
namespaces Kconfig: remove the cgroup device whitelist experimental tag
namespaces Kconfig: remove pointless cgroup dependency
namespaces Kconfig: make namespace a submenu
...
Diffstat (limited to 'include/linux/kernel_stat.h')
-rw-r--r-- | include/linux/kernel_stat.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index c059044bc6dc..ad54c846911b 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h | |||
@@ -33,6 +33,7 @@ struct kernel_stat { | |||
33 | #ifndef CONFIG_GENERIC_HARDIRQS | 33 | #ifndef CONFIG_GENERIC_HARDIRQS |
34 | unsigned int irqs[NR_IRQS]; | 34 | unsigned int irqs[NR_IRQS]; |
35 | #endif | 35 | #endif |
36 | unsigned long irqs_sum; | ||
36 | unsigned int softirqs[NR_SOFTIRQS]; | 37 | unsigned int softirqs[NR_SOFTIRQS]; |
37 | }; | 38 | }; |
38 | 39 | ||
@@ -54,6 +55,7 @@ static inline void kstat_incr_irqs_this_cpu(unsigned int irq, | |||
54 | struct irq_desc *desc) | 55 | struct irq_desc *desc) |
55 | { | 56 | { |
56 | kstat_this_cpu.irqs[irq]++; | 57 | kstat_this_cpu.irqs[irq]++; |
58 | kstat_this_cpu.irqs_sum++; | ||
57 | } | 59 | } |
58 | 60 | ||
59 | static inline unsigned int kstat_irqs_cpu(unsigned int irq, int cpu) | 61 | static inline unsigned int kstat_irqs_cpu(unsigned int irq, int cpu) |
@@ -65,8 +67,9 @@ static inline unsigned int kstat_irqs_cpu(unsigned int irq, int cpu) | |||
65 | extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu); | 67 | extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu); |
66 | #define kstat_irqs_this_cpu(DESC) \ | 68 | #define kstat_irqs_this_cpu(DESC) \ |
67 | ((DESC)->kstat_irqs[smp_processor_id()]) | 69 | ((DESC)->kstat_irqs[smp_processor_id()]) |
68 | #define kstat_incr_irqs_this_cpu(irqno, DESC) \ | 70 | #define kstat_incr_irqs_this_cpu(irqno, DESC) do {\ |
69 | ((DESC)->kstat_irqs[smp_processor_id()]++) | 71 | ((DESC)->kstat_irqs[smp_processor_id()]++);\ |
72 | kstat_this_cpu.irqs_sum++; } while (0) | ||
70 | 73 | ||
71 | #endif | 74 | #endif |
72 | 75 | ||
@@ -83,6 +86,7 @@ static inline unsigned int kstat_softirqs_cpu(unsigned int irq, int cpu) | |||
83 | /* | 86 | /* |
84 | * Number of interrupts per specific IRQ source, since bootup | 87 | * Number of interrupts per specific IRQ source, since bootup |
85 | */ | 88 | */ |
89 | #ifndef CONFIG_GENERIC_HARDIRQS | ||
86 | static inline unsigned int kstat_irqs(unsigned int irq) | 90 | static inline unsigned int kstat_irqs(unsigned int irq) |
87 | { | 91 | { |
88 | unsigned int sum = 0; | 92 | unsigned int sum = 0; |
@@ -93,7 +97,17 @@ static inline unsigned int kstat_irqs(unsigned int irq) | |||
93 | 97 | ||
94 | return sum; | 98 | return sum; |
95 | } | 99 | } |
100 | #else | ||
101 | extern unsigned int kstat_irqs(unsigned int irq); | ||
102 | #endif | ||
96 | 103 | ||
104 | /* | ||
105 | * Number of interrupts per cpu, since bootup | ||
106 | */ | ||
107 | static inline unsigned int kstat_cpu_irqs_sum(unsigned int cpu) | ||
108 | { | ||
109 | return kstat_cpu(cpu).irqs_sum; | ||
110 | } | ||
97 | 111 | ||
98 | /* | 112 | /* |
99 | * Lock/unlock the current runqueue - to extract task statistics: | 113 | * Lock/unlock the current runqueue - to extract task statistics: |