* [sched/core] cpuacct_charge() problem
@ 2017-11-09 14:51 Pavel V. Panteleev
0 siblings, 0 replies; only message in thread
From: Pavel V. Panteleev @ 2017-11-09 14:51 UTC (permalink / raw)
To: linux-kernel; +Cc: mingo, peterz, zhaolei
Hello!
task_pt_regs() always show on the user regs for user thread, even if
it's working in kernel mode now. So, index calculation in
cpuacct_charge() isn't correct and it's always CPUACCT_STAT_USER for
user thread. The time, spent in kernel mode for user task, will be lost:
int index = CPUACCT_STAT_SYSTEM;
struct pt_regs *regs = task_pt_regs(tsk);
if (regs && user_mode(regs))
index = CPUACCT_STAT_USER;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-11-09 14:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-09 14:51 [sched/core] cpuacct_charge() problem Pavel V. Panteleev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.