Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932560Ab2EUXLI (ORCPT ); Mon, 21 May 2012 19:11:08 -0400 Received: from www.linutronix.de ([62.245.132.108]:34018 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932388Ab2EUXLD (ORCPT ); Mon, 21 May 2012 19:11:03 -0400 Date: Tue, 22 May 2012 01:11:01 +0200 (CEST) From: Thomas Gleixner To: "Michael S. Tsirkin" cc: kvm@vger.kernel.org, Avi Kivity , Marcelo Tosatti , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] kvm: optimize ISR lookups In-Reply-To: <20120521222449.GJ17031@redhat.com> Message-ID: References: <20120521163727.GA13337@redhat.com> <20120521215127.GH17031@redhat.com> <20120521222449.GJ17031@redhat.com> User-Agent: Alpine 2.02 (LFD 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1818 Lines: 49 On Tue, 22 May 2012, Michael S. Tsirkin wrote: > On Tue, May 22, 2012 at 12:14:18AM +0200, Thomas Gleixner wrote: > > On Tue, 22 May 2012, Michael S. Tsirkin wrote: > > > > > On Mon, May 21, 2012 at 11:04:25PM +0200, Thomas Gleixner wrote: > > > > > @@ -242,6 +262,25 @@ static inline void apic_clear_irr(int vec, struct kvm_lapic *apic) > > > > > apic->irr_pending = true; > > > > > } > > > > > > > > > > +static inline void apic_set_isr(int vec, struct kvm_lapic *apic) > > > > > +{ > > > > > + if (!__apic_test_and_set_vector(vec, apic->regs + APIC_ISR)) > > > > > + ++apic->isr_count; > > > > > + ASSERT(apic->isr_count > MAX_APIC_VECTOR); > > > > > > > > I'm really curious what you observed when defining DEBUG in that file. > > > > > > > > Clearly you never did. > > > > > > Sorry :( > > > Yes clearly silly, thanks for pointing this out. > > > > That's all you have a reply for? That's the least of the problems .... > > Others are not my fault :) > > Seriously, if Avi/Marcelo want to rewrite the ISR emulation > I can help. If they want to keep it 1:1 with hardware > then what I wrote seems the only way. Seriously. You submitted a code monkey patch, solving a problem by curing the symptom, but not the root cause. And then you hide behind Avi and Marcelo? Did you ever think about the real problem of that lapic emulation? Let's assume you did and it occured to you that the whole thing is wrong and backwards, then you still insist on adding more bullshit to that file instead of optimizing and fixing it in the first place? Thanks, tglx -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/