From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: TSC in qem[-kvm] 1.1+ and in-kernel irqchip Date: Sun, 12 Aug 2012 11:10:38 +0300 Message-ID: <20120812081038.GJ3341@redhat.com> References: <5024011F.2020200@msgid.tls.msk.ru> <20120810073346.GD24410@redhat.com> <5024D336.5090108@msgid.tls.msk.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Gerd Hoffmann , qemu-devel , KVM list , Avi Kivity To: Michael Tokarev Return-path: Content-Disposition: inline In-Reply-To: <5024D336.5090108@msgid.tls.msk.ru> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org On Fri, Aug 10, 2012 at 01:24:06PM +0400, Michael Tokarev wrote: > On 10.08.2012 11:33, Gleb Natapov wrote: > > On Thu, Aug 09, 2012 at 10:27:43PM +0400, Michael Tokarev wrote: > >> As a follow-up to the patch "tsc: use kvmclock for > >> calibration". > >> > >> There's another problem reported by several users. > >> The sympthom is that grub does not show boot menu, > >> it boots default entry right away without any pause. > >> > >> After quite some debugging it turned out to be > >> TSC issue. Grub uses tsc for its timeout handling. > >> When setting timeout to some very large value > >> (10000), I can see the counter is ticking backwards > >> at a very high speed, ticking from 10000 to 0 in > >> about 5 seconds. > >> > >> Running kvm -cpu host,-tsc forces grub to use > >> rtc clocksource, and the problem goes away. > >> > > Can you try -no-kvm-pit-reinjection please. > > It does not help. With -no-kvm-pit-reinjection, the > time in grub is ticking about 1000 times faster still, > just like without. > > >> The most interesting thing is that this is a > >> problem new for qemu-kvm 1.1 (and is still > >> present in current git), 1.0 version had no > >> such issue. And it only happens when in-kernel > >> irqchip is enabled -- running with -no-kvm-irqchip > >> also fixes the grub problem, so that tsc starts > >> counting "correctly" for grub again. > >> > > 1.0 work on the same kernel 1.1 doesn't? > > Yes. This issue does not look like kernel-dependent - > it happens the same way on 3.0, 3.2 and 3.5 kernels. > Note that upstream qemu 1.1+ is also affected, when > used with -machine pc,kernel_irqchip=on. > Any chance to bisect it? -- Gleb. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48480) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0TFz-0004Op-53 for qemu-devel@nongnu.org; Sun, 12 Aug 2012 04:10:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T0TFy-00018r-6p for qemu-devel@nongnu.org; Sun, 12 Aug 2012 04:10:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0TFx-00018j-V1 for qemu-devel@nongnu.org; Sun, 12 Aug 2012 04:10:42 -0400 Date: Sun, 12 Aug 2012 11:10:38 +0300 From: Gleb Natapov Message-ID: <20120812081038.GJ3341@redhat.com> References: <5024011F.2020200@msgid.tls.msk.ru> <20120810073346.GD24410@redhat.com> <5024D336.5090108@msgid.tls.msk.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5024D336.5090108@msgid.tls.msk.ru> Subject: Re: [Qemu-devel] TSC in qem[-kvm] 1.1+ and in-kernel irqchip List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: Gerd Hoffmann , qemu-devel , KVM list , Avi Kivity On Fri, Aug 10, 2012 at 01:24:06PM +0400, Michael Tokarev wrote: > On 10.08.2012 11:33, Gleb Natapov wrote: > > On Thu, Aug 09, 2012 at 10:27:43PM +0400, Michael Tokarev wrote: > >> As a follow-up to the patch "tsc: use kvmclock for > >> calibration". > >> > >> There's another problem reported by several users. > >> The sympthom is that grub does not show boot menu, > >> it boots default entry right away without any pause. > >> > >> After quite some debugging it turned out to be > >> TSC issue. Grub uses tsc for its timeout handling. > >> When setting timeout to some very large value > >> (10000), I can see the counter is ticking backwards > >> at a very high speed, ticking from 10000 to 0 in > >> about 5 seconds. > >> > >> Running kvm -cpu host,-tsc forces grub to use > >> rtc clocksource, and the problem goes away. > >> > > Can you try -no-kvm-pit-reinjection please. > > It does not help. With -no-kvm-pit-reinjection, the > time in grub is ticking about 1000 times faster still, > just like without. > > >> The most interesting thing is that this is a > >> problem new for qemu-kvm 1.1 (and is still > >> present in current git), 1.0 version had no > >> such issue. And it only happens when in-kernel > >> irqchip is enabled -- running with -no-kvm-irqchip > >> also fixes the grub problem, so that tsc starts > >> counting "correctly" for grub again. > >> > > 1.0 work on the same kernel 1.1 doesn't? > > Yes. This issue does not look like kernel-dependent - > it happens the same way on 3.0, 3.2 and 3.5 kernels. > Note that upstream qemu 1.1+ is also affected, when > used with -machine pc,kernel_irqchip=on. > Any chance to bisect it? -- Gleb.