From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760446AbdDZPoe (ORCPT ); Wed, 26 Apr 2017 11:44:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40792 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760342AbdDZPoL (ORCPT ); Wed, 26 Apr 2017 11:44:11 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E0CC99D41D Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=riel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E0CC99D41D Message-ID: <1493221444.31102.3.camel@redhat.com> Subject: Re: [PATCH] sched/cputime: Fix ksoftirqd cputime accounting regression From: Rik van Riel To: Frederic Weisbecker , Ingo Molnar Cc: LKML , Jesper Dangaard Brouer , Peter Zijlstra , Linus Torvalds , Wanpeng Li , Thomas Gleixner , Stanislaw Gruszka Date: Wed, 26 Apr 2017 11:44:04 -0400 In-Reply-To: <1493129448-5356-1-git-send-email-fweisbec@gmail.com> References: <1493129448-5356-1-git-send-email-fweisbec@gmail.com> Organization: Red Hat, Inc Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 26 Apr 2017 15:44:11 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2017-04-25 at 16:10 +0200, Frederic Weisbecker wrote: > irq_time_read() returns the irqtime minus the ksoftirqd time. This > is necessary because irq_time_read() is used to substract the IRQ > time > from the sum_exec_runtime of a task. If we were to include the > softirq > time of ksoftirqd, this task would substract its own CPU time > everytime > it updates ksoftirqd->sum_exec_runtime which would therefore never > progress. > > But this behaviour got broken by commit a499a5a14db: > ("sched/cputime: Increment kcpustat directly on irqtime > account") > which now includes ksoftirqd softirq time in the time returned by > irq_time_read(). Ahhh, after a look at account_system_time, it becomes clear why that was happening! Reviewed-by: Rik van Riel