From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [RFC PATCH 4/5] APIC/IOAPIC EOI callback Date: Mon, 12 Jul 2010 12:05:36 +0300 Message-ID: <20100712090536.GB31191@redhat.com> References: <20100711180910.20121.93313.stgit@localhost6.localdomain6> <20100711180936.20121.35376.stgit@localhost6.localdomain6> <4C3A09F3.8010304@redhat.com> <1278872784.20397.18.camel@x201> <4C3A0DE3.8010806@redhat.com> <4C3AB728.7050406@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alex Williamson , kvm@vger.kernel.org, qemu-devel@nongnu.org, pugs@cisco.com, chrisw@redhat.com, mst@redhat.com To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:3197 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752029Ab0GLJFk (ORCPT ); Mon, 12 Jul 2010 05:05:40 -0400 Content-Disposition: inline In-Reply-To: <4C3AB728.7050406@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Jul 12, 2010 at 09:33:12AM +0300, Avi Kivity wrote: > On 07/11/2010 09:30 PM, Avi Kivity wrote: > >>Registering an eventfd for the eoi seems like a reasonable alternative. > > > >I'm worried about that racing (with what?) > > I don't think there's a problem. > > First, the EOI message is itself asynchronous. While the write to > the local APIC is synchronous, effects on the rest of the system are > effected using an APIC message, which travels asynchronously. > > Second, a component that needs timely information doesn't have to > wait; it can read the eventfd and be sure it has seen all EOIs up to > now. > I remember we already discussed the use of eventfd for reporting EOI and decided against it, but I don't remember why. :( Was it because if we are going to export EOI to userspace anyway we want to be able to use it for RTC timedrift fixing and for that we need to know what CPU called EOI and eventfd can't provide that? -- Gleb.