diff options
author | Muchun Song <[email protected]> | 2020-04-20 15:04:53 +0800 |
---|---|---|
committer | Peter Zijlstra <[email protected]> | 2020-05-19 20:34:14 +0200 |
commit | dbe9337109c2705f08e6a00392f991eb2d2570a5 (patch) | |
tree | 7b5079a3ac04d5b5d3933b672e9ff93fef1a495d /scripts/gcc-plugins/gcc-common.h | |
parent | 04f5c362ec6d3ff0e14f1c05230b550da7f528a4 (diff) |
sched/cpuacct: Fix charge cpuacct.usage_sys
The user_mode(task_pt_regs(tsk)) always return true for
user thread, and false for kernel thread. So it means that
the cpuacct.usage_sys is the time that kernel thread uses
not the time that thread uses in the kernel mode. We can
try get_irq_regs() first, if it is NULL, then we can fall
back to task_pt_regs().
Signed-off-by: Muchun Song <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'scripts/gcc-plugins/gcc-common.h')
0 files changed, 0 insertions, 0 deletions