mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC PATCH 1/3] cputime: fix a account error of softirq
@ 2019-07-23  6:01 Alex Shi
  2019-07-23  6:01 ` [RFC PATCH 2/3] cputime: unify account_idle_ticks Alex Shi
  2019-07-23  6:01 ` [RFC PATCH 3/3] cputime: unify account_process_tick func Alex Shi
  0 siblings, 2 replies; 3+ messages in thread
From: Alex Shi @ 2019-07-23  6:01 UTC (permalink / raw)
  Cc: Alex Shi, Ingo Molnar, Peter Zijlstra, Frederic Weisbecker,
	Wanpeng Li, Thomas Gleixner, linux-kernel

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@linux.alibaba.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Wanpeng Li <wanpeng.li@hotmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
---
 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-23  6:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-23  6:01 [RFC PATCH 1/3] cputime: fix a account error of softirq Alex Shi
2019-07-23  6:01 ` [RFC PATCH 2/3] cputime: unify account_idle_ticks Alex Shi
2019-07-23  6:01 ` [RFC PATCH 3/3] cputime: unify account_process_tick func Alex Shi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®