From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: The HPET issue on Linux Date: Wed, 6 Jan 2010 22:37:33 +0200 Message-ID: <20100106203733.GB24476@redhat.com> References: <201001061748.52689.sheng@linux.intel.com> <20100106100957.GF4905@redhat.com> <4B44648F.2010702@redhat.com> <4B44D82A.9030805@us.ibm.com> <4B44E27F.6090406@us.ibm.com> <4B44E330.4080805@codemonkey.ws> <20100106194411.GA24476@redhat.com> <4B44E9DA.2050000@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Beth Kon , dlaor@redhat.com, Sheng Yang , kvm@vger.kernel.org To: Anthony Liguori Return-path: Received: from mx1.redhat.com ([209.132.183.28]:14688 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932451Ab0AFUhr (ORCPT ); Wed, 6 Jan 2010 15:37:47 -0500 Content-Disposition: inline In-Reply-To: <4B44E9DA.2050000@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Jan 06, 2010 at 01:51:54PM -0600, Anthony Liguori wrote: > On 01/06/2010 01:44 PM, Gleb Natapov wrote: > >On Wed, Jan 06, 2010 at 01:23:28PM -0600, Anthony Liguori wrote: > >>On 01/06/2010 01:20 PM, Beth Kon wrote: > >>>Beth Kon wrote: > >>>>I will try to look into this. Since HPET is edge-triggered, > >>>>looks like this problem is of a different nature than PIT. Is > >>>>this a solid failure or intermittent? > >>>Anthony just explained that on x86, even edge-triggered interrupts > >>>are queued in the apic and an eoi will occur, so this is not > >>>different than the PIT. > >>Not quite queued in the sense that multiple events will be delivered > >>in order, but I think the point is that you can still detect whether > >>delivery succeeded by counting APIC EOIs. > >> > >>The trouble is that historically we've struggled with doing this in > >>userspace. Maybe it's time to revisit. > >> > >We reinject PIT interrupts from kernel and RTC interrupts from > >userspace. > > Because we can determine that we've missed an RTC interrupt in > userspace. We cannot determine this with the PIT without adding a > hook into the userspace apic that lets us know whether an injection > failed or not. > We have exactly that hook in apic already and that's how RTC determines that interrupt was coalesced. -- Gleb.