Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 339082
b: refs/heads/master
c: 3e1df4f
h: refs/heads/master
v: v3
  • Loading branch information
Frederic Weisbecker committed Oct 29, 2012
1 parent fb408cd commit 8147a3c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fa5058f3b63153e0147ef65bcdb3a4ee63581346
refs/heads/master: 3e1df4f506836e6bea1ab61cf88c75c8b1840643
18 changes: 8 additions & 10 deletions trunk/include/linux/vtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@ extern void vtime_task_switch(struct task_struct *prev);
extern void __vtime_account_system(struct task_struct *tsk);
extern void vtime_account_system(struct task_struct *tsk);
extern void __vtime_account_idle(struct task_struct *tsk);
extern void vtime_account(struct task_struct *tsk);
#else
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(struct task_struct *tsk) { }
static inline void vtime_account(struct task_struct *tsk) { }
#endif

#if !defined(CONFIG_VIRT_CPU_ACCOUNTING) && !defined(CONFIG_IRQ_TIME_ACCOUNTING)
static inline void vtime_account(struct task_struct *tsk)
{
}
#ifdef CONFIG_IRQ_TIME_ACCOUNTING
extern void irqtime_account_irq(struct task_struct *tsk);
#else
extern void vtime_account(struct task_struct *tsk);
static inline void irqtime_account_irq(struct task_struct *tsk) { }
#endif

static inline void vtime_account_irq_enter(struct task_struct *tsk)
Expand All @@ -33,17 +34,14 @@ static inline void vtime_account_irq_enter(struct task_struct *tsk)
* the idle time is flushed on hardirq time already.
*/
vtime_account(tsk);
irqtime_account_irq(tsk);
}

static inline void vtime_account_irq_exit(struct task_struct *tsk)
{
#ifdef CONFIG_VIRT_CPU_ACCOUNTING
/* On hard|softirq exit we always account to hard|softirq cputime */
__vtime_account_system(tsk);
#endif
#ifdef CONFIG_IRQ_TIME_ACCOUNTING
vtime_account(tsk);
#endif
irqtime_account_irq(tsk);
}

#endif /* _LINUX_KERNEL_VTIME_H */
4 changes: 2 additions & 2 deletions trunk/kernel/sched/cputime.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ DEFINE_PER_CPU(seqcount_t, irq_time_seq);
* Called before incrementing preempt_count on {soft,}irq_enter
* and before decrementing preempt_count on {soft,}irq_exit.
*/
void vtime_account(struct task_struct *curr)
void irqtime_account_irq(struct task_struct *curr)
{
unsigned long flags;
s64 delta;
Expand Down Expand Up @@ -73,7 +73,7 @@ void vtime_account(struct task_struct *curr)
irq_time_write_end();
local_irq_restore(flags);
}
EXPORT_SYMBOL_GPL(vtime_account);
EXPORT_SYMBOL_GPL(irqtime_account_irq);

static int irqtime_account_hi_update(void)
{
Expand Down

0 comments on commit 8147a3c

Please sign in to comment.