Skip to content

Commit

Permalink
[POWERPC] Fix stolen time for SMT without LPAR
Browse files Browse the repository at this point in the history
For POWERPC, stolen time accounts for cycles lost to the hypervisor or
PURR cycles attributed to the other SMT thread.  Hence, when a PURR is
available, we should still calculate stolen time, irrespective of being
virtualised.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Michael Neuling authored and Paul Mackerras committed Jun 25, 2007
1 parent bb807e6 commit 4cefebb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ static void account_process_time(struct pt_regs *regs)
run_posix_cpu_timers(current);
}

#ifdef CONFIG_PPC_SPLPAR
/*
* Stuff for accounting stolen time.
*/
Expand Down Expand Up @@ -279,6 +278,7 @@ void calculate_steal_time(void)
pme->purr = purr;
}

#ifdef CONFIG_PPC_SPLPAR
/*
* Must be called before the cpu is added to the online map when
* a cpu is being brought up at runtime.
Expand Down
2 changes: 1 addition & 1 deletion include/asm-powerpc/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ extern void account_process_vtime(struct task_struct *tsk);
#define account_process_vtime(tsk) do { } while (0)
#endif

#if defined(CONFIG_VIRT_CPU_ACCOUNTING) && defined(CONFIG_PPC_SPLPAR)
#if defined(CONFIG_VIRT_CPU_ACCOUNTING)
extern void calculate_steal_time(void);
extern void snapshot_timebases(void);
#else
Expand Down

0 comments on commit 4cefebb

Please sign in to comment.