From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752056AbcF0Xbe (ORCPT ); Mon, 27 Jun 2016 19:31:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40244 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751940AbcF0Xbd (ORCPT ); Mon, 27 Jun 2016 19:31:33 -0400 Message-ID: <1467070289.22723.22.camel@redhat.com> Subject: Re: [PATCH 2/5] nohz,cputime: remove VTIME_GEN vtime irq time code From: Rik van Riel To: Frederic Weisbecker Cc: linux-kernel@vger.kernel.org, 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 Date: Mon, 27 Jun 2016 19:31:29 -0400 In-Reply-To: <20160627232105.GA7582@lerouge> References: <1466648751-7958-1-git-send-email-riel@redhat.com> <1466648751-7958-3-git-send-email-riel@redhat.com> <20160627232105.GA7582@lerouge> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-EGjet3P4e8V/T8bNSehj" Mime-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 27 Jun 2016 23:31:33 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-EGjet3P4e8V/T8bNSehj Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2016-06-28 at 01:21 +0200, Frederic Weisbecker wrote: > On Wed, Jun 22, 2016 at 10:25:48PM -0400, riel@redhat.com wrote: > >=20 > > From: Rik van Riel > >=20 > > The CONFIG_VIRT_CPU_ACCOUNTING_GEN irq time tracking code does not > > appear to currently work right. > >=20 > > On CPUs that are nohz_full, people typically do not assign IRQs. > Right, but they can still fire. At least one tick per second, plus > the > pinned timers, etc... >=20 > >=20 > >=20 > > On the housekeeping CPU (when a system is booted up with > > nohz_full), > > sampling should work ok to determine irq and softirq time use, but > > that only covers the housekeeping CPU itself, not the other > > non-nohz_full CPUs. > Hmm, every non-nohz_full CPUs, including the CPU 0, account the > irqtime > the same way: through the tick (and therefore can't account much of > it). >=20 But it will be subtracted from the user time, rather than the idle time during which the irqs happened. Furthermore, we might well have 100 jiffies worth of irq & softirq time on a CPU, and get just 1 jiffy of userspace time, on systems acting like routers. > >=20 > >=20 > > On CPUs that are nohz_idle (the typical way a distro kernel is > > booted), irq time is not accounted at all while the CPU is idle, > > due to the lack of timer ticks. > But as soon as a timer tick fires in idle or afterward, the pending > irqtime is accounted. >=20 > That said I don't see how it explains why we do the below: >=20 > >=20 > >=20 > > Remove the VTIME_GEN vtime irq time code. The next patch will > > allow NO_HZ_FULL kernels to use the IRQ_TIME_ACCOUNTING code. > I don't get the reason why we are doing this. Now arguably the > irqtime > accounting is probably not working as well as before since we > switched to > jiffy clock. But I still see some hard irqs accounted when > account_irq_exit() > is lucky enough to observe that jiffies changed since the beginning > of > the interrupt. >=20 > So it's not entirely broken. I agree that we need to switch it to the > generic irqtime accounting code but breaking the code now to > reactivate it > in a subsequent patch is prone to future bisection issues. Want me to merge patches 2 & 3 into one, so we immediately start using the generic code and do not run into bisect issues? --=20 All Rights Reversed. --=-EGjet3P4e8V/T8bNSehj 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 iQEcBAABCAAGBQJXcbdRAAoJEM553pKExN6D7BUIALOqKVwcrFJ/cV/TPTW/4iIr sNl6e5zaZWb+ODCd9WNUznGX8vx/NZgj+yZPixnEgClmcMypZZRBijwESJ0313XJ 7Fz4p1vaCNjNuGCWz64H/CoTSSJ3qu1BnheK1S5u6wrq8TiKJwamko64+9cO2toZ YrLpfusHkxcTxoW1hx3/t8sutrOEhGZhSvYAz04ii5QdlluDTEuDsrIymdzv3Wsk eLMzXaWeYlrY4BFOVaGWqN5aNHq0wW8lPd5Wct4kEJRVEkb2qwA7q81qgf8qmODU hQiiehfDdaKb2hrBD1aC/FHgwJp8GGOMxAUhCHkOeVxYvGhn6ciAppta4hQoHls= =q+X5 -----END PGP SIGNATURE----- --=-EGjet3P4e8V/T8bNSehj--