forked fromtorvalds/linux
- Notifications
You must be signed in to change notification settings - Fork0
Commitdbe9337
Muchun Song
Peter Zijlstra
sched/cpuacct: Fix charge cpuacct.usage_sys
The user_mode(task_pt_regs(tsk)) always return true foruser thread, and false for kernel thread. So it means thatthe cpuacct.usage_sys is the time that kernel thread usesnot the time that thread uses in the kernel mode. We cantry get_irq_regs() first, if it is NULL, then we can fallback to task_pt_regs().Signed-off-by: Muchun Song <songmuchun@bytedance.com>Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>Link:https://lkml.kernel.org/r/20200420070453.76815-1-songmuchun@bytedance.com1 parent04f5c36 commitdbe9337
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
339 | 340 | | |
340 | 341 | | |
341 | 342 | | |
342 | | - | |
| 343 | + | |
343 | 344 | | |
344 | 345 | | |
345 | 346 | | |
| |||
0 commit comments
Comments
(0)