From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=48937 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHBf7-0005tO-Cg for qemu-devel@nongnu.org; Wed, 26 May 2010 04:08:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHBf6-0006Pq-4d for qemu-devel@nongnu.org; Wed, 26 May 2010 04:08:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62159) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHBf5-0006PP-Ts for qemu-devel@nongnu.org; Wed, 26 May 2010 04:08:24 -0400 Date: Wed, 26 May 2010 11:08:14 +0300 From: Gleb Natapov Subject: Re: [Qemu-devel] Re: [RFT][PATCH 07/15] qemu_irq: Add IRQ handlers with delivery feedback Message-ID: <20100526080814.GB2618@redhat.com> References: <4BFC3028.6030303@codemonkey.ws> <4BFC44D2.2090608@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BFC44D2.2090608@web.de> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Blue Swirl , qemu-devel@nongnu.org, Juan Quintela On Tue, May 25, 2010 at 11:44:50PM +0200, Jan Kiszka wrote: > > > >> I think the real solution to coalescing is put the logic inside one > >> device, in this case APIC because it has the information about irq > >> delivery. APIC could monitor incoming RTC irqs for frequency > >> information and whether they get delivered or not. If not, an internal > >> timer is installed which injects the lost irqs. > > That won't fly as the IRQs will already arrive at the APIC with a > sufficiently high jitter. At the bare minimum, you need to tell the > interrupt controller about the fact that a particular IRQ should be > delivered at a specific regular rate. For this, you also need a generic > interface - nothing really "won". > Not only that. Suppose RTC runs with 64Hz frequency and N interrupts were coalesced during some period. Now the guest reprograms RTC to 1024Hz. N should be scaled accordingly otherwise reinjection will not fix the drift. Do you propose to put this logic into APIC to? -- Gleb.