From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: The HPET issue on Linux Date: Wed, 06 Jan 2010 13:51:54 -0600 Message-ID: <4B44E9DA.2050000@codemonkey.ws> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Beth Kon , dlaor@redhat.com, Sheng Yang , kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mail-yw0-f176.google.com ([209.85.211.176]:37964 "EHLO mail-yw0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932674Ab0AFTv6 (ORCPT ); Wed, 6 Jan 2010 14:51:58 -0500 Received: by ywh6 with SMTP id 6so17757856ywh.4 for ; Wed, 06 Jan 2010 11:51:57 -0800 (PST) In-Reply-To: <20100106194411.GA24476@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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. Regards, Anthony Liguori