From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932694AbcHIOGZ (ORCPT ); Tue, 9 Aug 2016 10:06:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51040 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932190AbcHIOGY (ORCPT ); Tue, 9 Aug 2016 10:06:24 -0400 Message-ID: <1470751579.13905.77.camel@redhat.com> Subject: Re: [PATCH 1/5] sched,time: Count actually elapsed irq & softirq time From: Rik van Riel To: Wanpeng Li , Frederic Weisbecker Cc: Ingo Molnar , LKML , Paolo Bonzini , Peter Zijlstra , Wanpeng Li , Thomas Gleixner , Radim Krcmar , Mike Galbraith Date: Tue, 09 Aug 2016 10:06:19 -0400 In-Reply-To: References: <1468421405-20056-1-git-send-email-fweisbec@gmail.com> <1468421405-20056-2-git-send-email-fweisbec@gmail.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-2bdeksLfj96FtoVlS8O3" Mime-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 09 Aug 2016 14:06:24 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-2bdeksLfj96FtoVlS8O3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2016-08-09 at 11:59 +0800, Wanpeng Li wrote: > Hi Rik, > 2016-07-13 22:50 GMT+08:00 Frederic Weisbecker : > > From: Rik van Riel > >=20 > > Currently, if there was any irq or softirq time during 'ticks' > > jiffies, the entire period will be accounted as irq or softirq > > time. > >=20 > > This is inaccurate if only a subset of the time was actually spent > > handling irqs, and could conceivably mis-count all of the ticks > > during > > a period as irq time, when there was some irq and some softirq > > time. > >=20 > > This can actually happen when irqtime_account_process_tick is > > called > > from account_idle_ticks, which can pass a larger number of ticks > > down > > all at once. > >=20 > > Fix this by changing irqtime_account_hi_update, > > irqtime_account_si_update, > > and steal_account_process_ticks to work with cputime_t time units, > > and > > return the amount of time spent in each mode. >=20 > Do we need to minus st cputime from idle cputime in > account_idle_ticks() when noirqtime is true? I try to add this logic > w/ noirqtime and idle=3Dpoll boot parameter for a full dynticks guest, > however, there is no difference, where I miss? Yes, you are right. The code in account_idle_ticks() could use the same treatment. I am not sure why it would not work, though... --=20 All Rights Reversed. --=-2bdeksLfj96FtoVlS8O3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJXqeNcAAoJEM553pKExN6DenIIAILr4V1GnjAMIcGCabZhFao0 RuPWMiVqLmfh+8LyMjNxrZQWnApQs5s1J17/K/sdMS09L//D/DDevne/rP/ClPBt c3CFnQ9s80zFnGGHzPCXUPGf1kV5WdVl66CSi+wHQrIm4nmt5lWWucHY4hT8qikC +W9ngwjKzIO5NHAnpquwmQjde2OPQT2qFuErEbZkbooIcST18RI90Ee2ortALHqL dGRWw/mvGfziicqlz4l8kiHr6h0Efg/DQwzhzt2b7R6pDnx8cXGUuylaE0QTh/1t Dt++t6LWmxcNixpHBRXEbMaA1OA0wLcWKCXXlMrRNpEY+zHijJXtTLHy9SaD0Ts= =4a8U -----END PGP SIGNATURE----- --=-2bdeksLfj96FtoVlS8O3--