Skip to content

Commit 4cefebb

Browse files
mikeypaulusmack
authored andcommitted
[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: Michael Neuling <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
1 parent bb807e6 commit 4cefebb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/powerpc/kernel/time.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ static void account_process_time(struct pt_regs *regs)
214214
run_posix_cpu_timers(current);
215215
}
216216

217-
#ifdef CONFIG_PPC_SPLPAR
218217
/*
219218
* Stuff for accounting stolen time.
220219
*/
@@ -279,6 +278,7 @@ void calculate_steal_time(void)
279278
pme->purr = purr;
280279
}
281280

281+
#ifdef CONFIG_PPC_SPLPAR
282282
/*
283283
* Must be called before the cpu is added to the online map when
284284
* a cpu is being brought up at runtime.

include/asm-powerpc/time.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ extern void account_process_vtime(struct task_struct *tsk);
232232
#define account_process_vtime(tsk) do { } while (0)
233233
#endif
234234

235-
#if defined(CONFIG_VIRT_CPU_ACCOUNTING) && defined(CONFIG_PPC_SPLPAR)
235+
#if defined(CONFIG_VIRT_CPU_ACCOUNTING)
236236
extern void calculate_steal_time(void);
237237
extern void snapshot_timebases(void);
238238
#else

0 commit comments

Comments
 (0)