[RFC PATCH 1/3] cputime: fix a account error of softirq

From: Alex Shi
Date: Tue Jul 23 2019 - 02:07:54 EST


According the comments before this line:
* ksoftirqd time do not get accounted in cpu_softirq_time.
And process in irqtime_account_irq()
I guess the original attempt is to account ksoftirqd into
system time instead of softirq time.

Signed-off-by: Alex Shi <alex.shi@xxxxxxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: Wanpeng Li <wanpeng.li@xxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
---
kernel/sched/cputime.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
index 2305ce89a26c..d78aee140957 100644
--- a/kernel/sched/cputime.c
+++ b/kernel/sched/cputime.c
@@ -378,7 +378,7 @@ static void irqtime_account_process_tick(struct task_struct *p, int user_tick,
* So, we have to handle it separately here.
* Also, p->stime needs to be updated for ksoftirqd.
*/
- account_system_index_time(p, cputime, CPUTIME_SOFTIRQ);
+ account_system_index_time(p, cputime, CPUTIME_SYSTEM);
} else if (user_tick) {
account_user_time(p, cputime);
} else if (p == rq->idle) {
--
2.19.1.856.g8858448bb