From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40743) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLwFP-0005y4-Rc for qemu-devel@nongnu.org; Wed, 20 Jan 2016 12:08:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLwFL-00007I-R8 for qemu-devel@nongnu.org; Wed, 20 Jan 2016 12:08:43 -0500 Received: from foss.arm.com ([217.140.101.70]:45492) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLwFL-000069-Kt for qemu-devel@nongnu.org; Wed, 20 Jan 2016 12:08:39 -0500 References: <1453204158-11412-1-git-send-email-christoffer.dall@linaro.org> <20160119123716.GA10814@hawk.localdomain> <20160119124341.GA11756@cbox> <20160119133232.GA13745@hawk.localdomain> <569E3D6B.5030501@arm.com> <20160119184814.GC26962@hawk.localdomain> <20160120140121.GA3723@hawk.localdomain> <569F9975.90405@arm.com> <20160120150618.GB3723@hawk.localdomain> <569FB3B3.7040303@arm.com> <20160120164749.GC3723@hawk.localdomain> From: Marc Zyngier Message-ID: <569FBF14.20201@arm.com> Date: Wed, 20 Jan 2016 17:08:36 +0000 MIME-Version: 1.0 In-Reply-To: <20160120164749.GC3723@hawk.localdomain> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] hw/arm/virt: Add always-on property to the virt board timer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrew Jones Cc: Mark Rutland , qemu-devel@nongnu.org, Christoffer Dall On 20/01/16 16:47, Andrew Jones wrote: > On Wed, Jan 20, 2016 at 04:20:03PM +0000, Marc Zyngier wrote: >> Just tried on Seattle with a 64bit guest, and there is hardly any >> difference indeed. Both host and guest are "mostly" defconfig as well. >> So there is a kernel configuration difference. >> >> Running my 32bit guest on a 64bit host definitely shows a massive >> difference (with 8 vcpus): >> >> Without "always-on": ~1200 interrupts per second >> With "always-on": ~50 interrupts per second >> >> [Head scratching, poking Mark] >> >> Right, I now know what is going on: The arm64 kernel uses >> tick_setup_hrtimer_broadcast() so that it can still use the arch timer >> as a broadcast timer (forcing one CPU to remain on), while the 32bit >> kernel relies on the presence of a backup timer (sp804 anyone?) or the >> guarantee that the timer cannot go away (always-on). >> >> This is probably why I'm seeing such a gain with a 32bit guest, and none >> with a 64bit guest (the kernel already does the right thing). As to why >> there is such a difference between the two architectures, this is a >> story for another day... >> > > Thanks Marc! I just confirmed with an AArch32 guest using QEMU, and the > patch we've hijacked for this thread. Without the patch I get a megaton > of interrupts (~14000/s). With the patch, after letting the guest chill > for a while, I'm getting ~150/s (8 vcpus). > > I guess I don't have a test case for the ACPI code though. afaik we only > have UEFI for AArch64 guests, and we don't have ACPI boot without UEFI. > Or maybe I can hack time_init to remove the tick_setup_hrtimer_broadcast > call? Yeah, that should work. Thanks, M. -- Jazz is not dead. It just smells funny...