diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2012-09-08 09:23:11 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2012-09-25 09:31:31 -0400 |
commit | bf9fae9f5e4ca8dce4708812f9ad6281e61df109 (patch) | |
tree | 02318ac3db48dd993a4a430de5de66a337895d16 /arch | |
parent | bc2a27cd27271c5257989a57f511be86b26f5e54 (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 'arch')
-rw-r--r-- | arch/ia64/kernel/time.c | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/time.c | 10 | ||||
-rw-r--r-- | arch/s390/kernel/vtime.c | 6 |
3 files changed, 11 insertions, 11 deletions
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index 6247197b9877..16bb6eda879d 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c | |||
@@ -88,7 +88,7 @@ extern cputime_t cycle_to_cputime(u64 cyc); | |||
88 | * accumulated times to the current process, and to prepare accounting on | 88 | * accumulated times to the current process, and to prepare accounting on |
89 | * the next process. | 89 | * the next process. |
90 | */ | 90 | */ |
91 | void account_switch_vtime(struct task_struct *prev) | 91 | void vtime_task_switch(struct task_struct *prev) |
92 | { | 92 | { |
93 | struct thread_info *pi = task_thread_info(prev); | 93 | struct thread_info *pi = task_thread_info(prev); |
94 | struct thread_info *ni = task_thread_info(current); | 94 | struct thread_info *ni = task_thread_info(current); |
@@ -116,7 +116,7 @@ void account_switch_vtime(struct task_struct *prev) | |||
116 | * Account time for a transition between system, hard irq or soft irq state. | 116 | * Account time for a transition between system, hard irq or soft irq state. |
117 | * Note that this function is called with interrupts enabled. | 117 | * Note that this function is called with interrupts enabled. |
118 | */ | 118 | */ |
119 | void account_system_vtime(struct task_struct *tsk) | 119 | void vtime_account(struct task_struct *tsk) |
120 | { | 120 | { |
121 | struct thread_info *ti = task_thread_info(tsk); | 121 | struct thread_info *ti = task_thread_info(tsk); |
122 | unsigned long flags; | 122 | unsigned long flags; |
@@ -138,7 +138,7 @@ void account_system_vtime(struct task_struct *tsk) | |||
138 | 138 | ||
139 | local_irq_restore(flags); | 139 | local_irq_restore(flags); |
140 | } | 140 | } |
141 | EXPORT_SYMBOL_GPL(account_system_vtime); | 141 | EXPORT_SYMBOL_GPL(vtime_account); |
142 | 142 | ||
143 | /* | 143 | /* |
144 | * Called from the timer interrupt handler to charge accumulated user time | 144 | * Called from the timer interrupt handler to charge accumulated user time |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 49da7f06e643..39899d7ebda0 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -291,7 +291,7 @@ static inline u64 calculate_stolen_time(u64 stop_tb) | |||
291 | * Account time for a transition between system, hard irq | 291 | * Account time for a transition between system, hard irq |
292 | * or soft irq state. | 292 | * or soft irq state. |
293 | */ | 293 | */ |
294 | void account_system_vtime(struct task_struct *tsk) | 294 | void vtime_account(struct task_struct *tsk) |
295 | { | 295 | { |
296 | u64 now, nowscaled, delta, deltascaled; | 296 | u64 now, nowscaled, delta, deltascaled; |
297 | unsigned long flags; | 297 | unsigned long flags; |
@@ -343,14 +343,14 @@ void account_system_vtime(struct task_struct *tsk) | |||
343 | } | 343 | } |
344 | local_irq_restore(flags); | 344 | local_irq_restore(flags); |
345 | } | 345 | } |
346 | EXPORT_SYMBOL_GPL(account_system_vtime); | 346 | EXPORT_SYMBOL_GPL(vtime_account); |
347 | 347 | ||
348 | /* | 348 | /* |
349 | * Transfer the user and system times accumulated in the paca | 349 | * Transfer the user and system times accumulated in the paca |
350 | * by the exception entry and exit code to the generic process | 350 | * by the exception entry and exit code to the generic process |
351 | * user and system time records. | 351 | * user and system time records. |
352 | * Must be called with interrupts disabled. | 352 | * Must be called with interrupts disabled. |
353 | * Assumes that account_system_vtime() has been called recently | 353 | * Assumes that vtime_account() has been called recently |
354 | * (i.e. since the last entry from usermode) so that | 354 | * (i.e. since the last entry from usermode) so that |
355 | * get_paca()->user_time_scaled is up to date. | 355 | * get_paca()->user_time_scaled is up to date. |
356 | */ | 356 | */ |
@@ -366,9 +366,9 @@ void account_process_tick(struct task_struct *tsk, int user_tick) | |||
366 | account_user_time(tsk, utime, utimescaled); | 366 | account_user_time(tsk, utime, utimescaled); |
367 | } | 367 | } |
368 | 368 | ||
369 | void account_switch_vtime(struct task_struct *prev) | 369 | void vtime_task_switch(struct task_struct *prev) |
370 | { | 370 | { |
371 | account_system_vtime(prev); | 371 | vtime_account(prev); |
372 | account_process_tick(prev, 0); | 372 | account_process_tick(prev, 0); |
373 | } | 373 | } |
374 | 374 | ||
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c index 449ac22cc71b..cb5093c26d16 100644 --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c | |||
@@ -99,7 +99,7 @@ static int do_account_vtime(struct task_struct *tsk, int hardirq_offset) | |||
99 | return virt_timer_forward(user + system); | 99 | return virt_timer_forward(user + system); |
100 | } | 100 | } |
101 | 101 | ||
102 | void account_switch_vtime(struct task_struct *prev) | 102 | void vtime_task_switch(struct task_struct *prev) |
103 | { | 103 | { |
104 | struct thread_info *ti; | 104 | struct thread_info *ti; |
105 | 105 | ||
@@ -122,7 +122,7 @@ void account_process_tick(struct task_struct *tsk, int user_tick) | |||
122 | * Update process times based on virtual cpu times stored by entry.S | 122 | * Update process times based on virtual cpu times stored by entry.S |
123 | * to the lowcore fields user_timer, system_timer & steal_clock. | 123 | * to the lowcore fields user_timer, system_timer & steal_clock. |
124 | */ | 124 | */ |
125 | void account_system_vtime(struct task_struct *tsk) | 125 | void vtime_account(struct task_struct *tsk) |
126 | { | 126 | { |
127 | struct thread_info *ti = task_thread_info(tsk); | 127 | struct thread_info *ti = task_thread_info(tsk); |
128 | u64 timer, system; | 128 | u64 timer, system; |
@@ -138,7 +138,7 @@ void account_system_vtime(struct task_struct *tsk) | |||
138 | 138 | ||
139 | virt_timer_forward(system); | 139 | virt_timer_forward(system); |
140 | } | 140 | } |
141 | EXPORT_SYMBOL_GPL(account_system_vtime); | 141 | EXPORT_SYMBOL_GPL(vtime_account); |
142 | 142 | ||
143 | void __kprobes vtime_stop_cpu(void) | 143 | void __kprobes vtime_stop_cpu(void) |
144 | { | 144 | { |