From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933052AbcGENDu (ORCPT ); Tue, 5 Jul 2016 09:03:50 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:38192 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751986AbcGENCq (ORCPT ); Tue, 5 Jul 2016 09:02:46 -0400 Subject: Re: [PATCH v3 0/4] sched,time: fix irq time accounting with nohz_idle To: riel@redhat.com, linux-kernel@vger.kernel.org References: <1467315350-3152-1-git-send-email-riel@redhat.com> Cc: peterz@infradead.org, mingo@kernel.org, pbonzini@redhat.com, fweisbec@redhat.com, wanpeng.li@hotmail.com, efault@gmx.de, tglx@linutronix.de, rkrcmar@redhat.com From: Nikolay Borisov Message-ID: <577BAFF1.6080806@kyup.com> Date: Tue, 5 Jul 2016 16:02:41 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1467315350-3152-1-git-send-email-riel@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/30/2016 10:35 PM, riel@redhat.com wrote: > Currently irq time accounting only works in these cases: > 1) purely ticke based accounting > 2) nohz_full accounting, but only on housekeeping & nohz_full CPUs > 3) architectures with native vtime accounting > > On nohz_idle CPUs, which are probably the majority nowadays, > irq time accounting is currently broken. This leads to systems > reporting a dramatically lower amount of irq & softirq time than > is actually spent handling them, with all the time spent while the > system is in the idle task being accounted as idle. Is this supposed to alleviate the issue reported here: http://www.gossamer-threads.com/lists/linux/kernel/2169180 > > This patch set seems to bring the amount of irq time reported by > top (and /proc/stat) roughly in line with that measured when I do > a "perf record -g -a" run to see what is using all that time. > > The amount of irq time used, especially softirq, is shockingly high, > to the point of me thinking this patch set may be wrong, but the > numbers seem to match what perf is giving me... > > These patches apply on top of Wanpeng Li's steal time patches. > > CONFIG_IRQ_TIME_ACCOUNTING is now a config option that is available > as a separate choice from tick based / nohz_idle / nohz_full mode, > a suggested by Frederic Weisbecker. > > Next up: look at the things that are using CPU time on an otherwise > idle system, and see if I can make those a little faster :) > > v2: address Peterz's concerns, some more cleanups > v3: rewrite the code along Frederic's suggestions, now cputime_t > is used everywhere >