From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60555C76188 for ; Tue, 23 Jul 2019 06:07:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 300DD22389 for ; Tue, 23 Jul 2019 06:07:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387996AbfGWGHv (ORCPT ); Tue, 23 Jul 2019 02:07:51 -0400 Received: from out30-44.freemail.mail.aliyun.com ([115.124.30.44]:34751 "EHLO out30-44.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729098AbfGWGHv (ORCPT ); Tue, 23 Jul 2019 02:07:51 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R941e4;CH=green;DM=||false|;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04446;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0TXc-Eyt_1563862068; Received: from localhost(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0TXc-Eyt_1563862068) by smtp.aliyun-inc.com(127.0.0.1); Tue, 23 Jul 2019 14:07:48 +0800 From: Alex Shi Cc: Alex Shi , Ingo Molnar , Peter Zijlstra , Frederic Weisbecker , Wanpeng Li , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: [RFC PATCH 1/3] cputime: fix a account error of softirq Date: Tue, 23 Jul 2019 14:01:40 +0800 Message-Id: <20190723060142.145747-1-alex.shi@linux.alibaba.com> X-Mailer: git-send-email 2.19.1.856.g8858448bb MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Frederic Weisbecker Cc: Wanpeng Li Cc: Thomas Gleixner 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