aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2012-09-08 09:23:11 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2012-09-25 09:31:31 -0400
commitbf9fae9f5e4ca8dce4708812f9ad6281e61df109 (patch)
tree02318ac3db48dd993a4a430de5de66a337895d16 /include/linux
parentbc2a27cd27271c5257989a57f511be86b26f5e54 (diff)
cputime: Use a proper subsystem naming for vtime related APIs
Use a naming based on vtime as a prefix for virtual based cputime accounting APIs: - account_system_vtime() -> vtime_account() - account_switch_vtime() -> vtime_task_switch() It makes it easier to allow for further declension such as vtime_account_system(), vtime_account_idle(), ... if we want to find out the context we account to from generic code. This also make it better to know on which subsystem these APIs refer to. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/hardirq.h8
-rw-r--r--include/linux/kernel_stat.h4
-rw-r--r--include/linux/kvm_host.h4
3 files changed, 8 insertions, 8 deletions
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h
index 305f23cd7cff..cab3da3d0949 100644
--- a/include/linux/hardirq.h
+++ b/include/linux/hardirq.h
@@ -132,11 +132,11 @@ extern void synchronize_irq(unsigned int irq);
132struct task_struct; 132struct task_struct;
133 133
134#if !defined(CONFIG_VIRT_CPU_ACCOUNTING) && !defined(CONFIG_IRQ_TIME_ACCOUNTING) 134#if !defined(CONFIG_VIRT_CPU_ACCOUNTING) && !defined(CONFIG_IRQ_TIME_ACCOUNTING)
135static inline void account_system_vtime(struct task_struct *tsk) 135static inline void vtime_account(struct task_struct *tsk)
136{ 136{
137} 137}
138#else 138#else
139extern void account_system_vtime(struct task_struct *tsk); 139extern void vtime_account(struct task_struct *tsk);
140#endif 140#endif
141 141
142#if defined(CONFIG_TINY_RCU) || defined(CONFIG_TINY_PREEMPT_RCU) 142#if defined(CONFIG_TINY_RCU) || defined(CONFIG_TINY_PREEMPT_RCU)
@@ -162,7 +162,7 @@ extern void rcu_nmi_exit(void);
162 */ 162 */
163#define __irq_enter() \ 163#define __irq_enter() \
164 do { \ 164 do { \
165 account_system_vtime(current); \ 165 vtime_account(current); \
166 add_preempt_count(HARDIRQ_OFFSET); \ 166 add_preempt_count(HARDIRQ_OFFSET); \
167 trace_hardirq_enter(); \ 167 trace_hardirq_enter(); \
168 } while (0) 168 } while (0)
@@ -178,7 +178,7 @@ extern void irq_enter(void);
178#define __irq_exit() \ 178#define __irq_exit() \
179 do { \ 179 do { \
180 trace_hardirq_exit(); \ 180 trace_hardirq_exit(); \
181 account_system_vtime(current); \ 181 vtime_account(current); \
182 sub_preempt_count(HARDIRQ_OFFSET); \ 182 sub_preempt_count(HARDIRQ_OFFSET); \
183 } while (0) 183 } while (0)
184 184
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h
index bbe5d15d6597..ca0944b92f4a 100644
--- a/include/linux/kernel_stat.h
+++ b/include/linux/kernel_stat.h
@@ -131,9 +131,9 @@ extern void account_steal_ticks(unsigned long ticks);
131extern void account_idle_ticks(unsigned long ticks); 131extern void account_idle_ticks(unsigned long ticks);
132 132
133#ifdef CONFIG_VIRT_CPU_ACCOUNTING 133#ifdef CONFIG_VIRT_CPU_ACCOUNTING
134extern void account_switch_vtime(struct task_struct *prev); 134extern void vtime_task_switch(struct task_struct *prev);
135#else 135#else
136static inline void account_switch_vtime(struct task_struct *prev) { } 136static inline void vtime_task_switch(struct task_struct *prev) { }
137#endif 137#endif
138 138
139#endif /* _LINUX_KERNEL_STAT_H */ 139#endif /* _LINUX_KERNEL_STAT_H */
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index b70b48b01098..8a59e0abe5fa 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -685,7 +685,7 @@ static inline int kvm_deassign_device(struct kvm *kvm,
685static inline void kvm_guest_enter(void) 685static inline void kvm_guest_enter(void)
686{ 686{
687 BUG_ON(preemptible()); 687 BUG_ON(preemptible());
688 account_system_vtime(current); 688 vtime_account(current);
689 current->flags |= PF_VCPU; 689 current->flags |= PF_VCPU;
690 /* KVM does not hold any references to rcu protected data when it 690 /* KVM does not hold any references to rcu protected data when it
691 * switches CPU into a guest mode. In fact switching to a guest mode 691 * switches CPU into a guest mode. In fact switching to a guest mode
@@ -699,7 +699,7 @@ static inline void kvm_guest_enter(void)
699 699
700static inline void kvm_guest_exit(void) 700static inline void kvm_guest_exit(void)
701{ 701{
702 account_system_vtime(current); 702 vtime_account(current);
703 current->flags &= ~PF_VCPU; 703 current->flags &= ~PF_VCPU;
704} 704}
705 705