Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 339095
b: refs/heads/master
c: bcebdf8
h: refs/heads/master
i:
  339093: b90c964
  339091: 0cba12e
  339087: cbf1f4e
v: v3
  • Loading branch information
Frederic Weisbecker committed Nov 19, 2012
1 parent 7ed447b commit 79ed27e
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 19 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: fd25b4c2f226de818e1d2b71e3e681d28bcaf5ba
refs/heads/master: bcebdf846522056a84ba0b0cba5f5413868c9394
11 changes: 1 addition & 10 deletions trunk/arch/ia64/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static struct clocksource *itc_clocksource;

extern cputime_t cycle_to_cputime(u64 cyc);

static void vtime_account_user(struct task_struct *tsk)
void vtime_account_user(struct task_struct *tsk)
{
cputime_t delta_utime;
struct thread_info *ti = task_thread_info(tsk);
Expand Down Expand Up @@ -147,15 +147,6 @@ void vtime_account_idle(struct task_struct *tsk)
account_idle_time(vtime_delta(tsk));
}

/*
* Called from the timer interrupt handler to charge accumulated user time
* to the current process. Must be called with interrupts disabled.
*/
void account_process_tick(struct task_struct *p, int user_tick)
{
vtime_account_user(p);
}

#endif /* CONFIG_VIRT_CPU_ACCOUNTING */

static irqreturn_t
Expand Down
14 changes: 7 additions & 7 deletions trunk/arch/powerpc/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,15 +355,15 @@ void vtime_account_idle(struct task_struct *tsk)
}

/*
* Transfer the user and system times accumulated in the paca
* by the exception entry and exit code to the generic process
* user and system time records.
* Transfer the user time accumulated in the paca
* by the exception entry and exit code to the generic
* process user time records.
* Must be called with interrupts disabled.
* Assumes that vtime_account() has been called recently
* (i.e. since the last entry from usermode) so that
* Assumes that vtime_account_system/idle() has been called
* recently (i.e. since the last entry from usermode) so that
* get_paca()->user_time_scaled is up to date.
*/
void account_process_tick(struct task_struct *tsk, int user_tick)
void vtime_account_user(struct task_struct *tsk)
{
cputime_t utime, utimescaled;

Expand All @@ -378,7 +378,7 @@ void account_process_tick(struct task_struct *tsk, int user_tick)
void vtime_task_switch(struct task_struct *prev)
{
vtime_account(prev);
account_process_tick(prev, 0);
vtime_account_user(prev);
}

#else /* ! CONFIG_VIRT_CPU_ACCOUNTING */
Expand Down
7 changes: 6 additions & 1 deletion trunk/arch/s390/kernel/vtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,12 @@ void vtime_task_switch(struct task_struct *prev)
S390_lowcore.system_timer = ti->system_timer;
}

void account_process_tick(struct task_struct *tsk, int user_tick)
/*
* In s390, accounting pending user time also implies
* accounting system time in order to correctly compute
* the stolen time accounting.
*/
void vtime_account_user(struct task_struct *tsk)
{
if (do_account_vtime(tsk, HARDIRQ_OFFSET))
virt_timer_expire();
Expand Down
8 changes: 8 additions & 0 deletions trunk/include/linux/kernel_stat.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,15 @@ extern void account_system_time(struct task_struct *, int, cputime_t, cputime_t)
extern void account_steal_time(cputime_t);
extern void account_idle_time(cputime_t);

#ifdef CONFIG_VIRT_CPU_ACCOUNTING
static inline void account_process_tick(struct task_struct *tsk, int user)
{
vtime_account_user(tsk);
}
#else
extern void account_process_tick(struct task_struct *, int user);
#endif

extern void account_steal_ticks(unsigned long ticks);
extern void account_idle_ticks(unsigned long ticks);

Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/vtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ extern void vtime_task_switch(struct task_struct *prev);
extern void vtime_account_system(struct task_struct *tsk);
extern void vtime_account_system_irqsafe(struct task_struct *tsk);
extern void vtime_account_idle(struct task_struct *tsk);
extern void vtime_account_user(struct task_struct *tsk);
extern void vtime_account(struct task_struct *tsk);
#else
static inline void vtime_task_switch(struct task_struct *prev) { }
Expand Down

0 comments on commit 79ed27e

Please sign in to comment.