Commit 4cefebb1 authored by Michael Neuling's avatar Michael Neuling Committed by Paul Mackerras

[POWERPC] Fix stolen time for SMT without LPAR

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: default avatarMichael Neuling <mikey@neuling.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent bb807e69
...@@ -214,7 +214,6 @@ static void account_process_time(struct pt_regs *regs) ...@@ -214,7 +214,6 @@ static void account_process_time(struct pt_regs *regs)
run_posix_cpu_timers(current); run_posix_cpu_timers(current);
} }
#ifdef CONFIG_PPC_SPLPAR
/* /*
* Stuff for accounting stolen time. * Stuff for accounting stolen time.
*/ */
...@@ -279,6 +278,7 @@ void calculate_steal_time(void) ...@@ -279,6 +278,7 @@ void calculate_steal_time(void)
pme->purr = purr; pme->purr = purr;
} }
#ifdef CONFIG_PPC_SPLPAR
/* /*
* Must be called before the cpu is added to the online map when * Must be called before the cpu is added to the online map when
* a cpu is being brought up at runtime. * a cpu is being brought up at runtime.
......
...@@ -232,7 +232,7 @@ extern void account_process_vtime(struct task_struct *tsk); ...@@ -232,7 +232,7 @@ extern void account_process_vtime(struct task_struct *tsk);
#define account_process_vtime(tsk) do { } while (0) #define account_process_vtime(tsk) do { } while (0)
#endif #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 calculate_steal_time(void);
extern void snapshot_timebases(void); extern void snapshot_timebases(void);
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment