Messages in this thread | | | Date | Fri, 4 Jan 2013 14:42:11 +0100 | Subject | Re: [PATCH 05/27] cputime: Safely read cputime of full dynticks CPUs | From | Frederic Weisbecker <> |
| |
2012/12/31 Li Zhong <zhong@linux.vnet.ibm.com>: > On Sat, 2012-12-29 at 17:42 +0100, Frederic Weisbecker wrote: >> static inline void vtime_task_switch(struct task_struct *prev) { } >> static inline void vtime_account_system(struct task_struct *tsk) { } >> static inline void vtime_account_system_irqsafe(struct task_struct *tsk) { } >> static inline void vtime_account_user(struct task_struct *tsk) { } >> -static inline void vtime_account(struct task_struct *tsk) { } >> +static inline void vtime_account_irq_enter(struct task_struct *tsk) { } >> static inline bool vtime_accounting(void) { return false; } >> #endif >> >> #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN >> -static inline void arch_vtime_task_switch(struct task_struct *tsk) { } >> +extern void arch_vtime_task_switch(struct task_struct *tsk); >> +extern void vtime_account_irq_exit(struct task_struct *tsk); >> +extern void vtime_user_enter(struct task_struct *tsk); >> +extern bool vtime_accounting(void); >> +#else >> +static inline void vtime_account_irq_exit(struct task_struct *tsk) >> +{ >> + /* On hard|softirq exit we always account to hard|softirq cputime */ >> + vtime_account_system(tsk); >> +} >> +static inline void vtime_enter_user(struct task_struct *tsk) { } > > I guess the function name above should be "vtime_user_enter" to match > the above extern, and the usage in user_enter()?
Totally! Thanks for pointing this out.
| |