From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH] KVM: x86: inline kvm_ioapic_handles_vector() Date: Mon, 23 Mar 2015 21:17:44 -0300 Message-ID: <20150324001743.GA16287@amt.cnet> References: <1426798361-14982-1-git-send-email-rkrcmar@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Paolo Bonzini To: Radim =?utf-8?B?S3LEjW3DocWZ?= Return-path: Content-Disposition: inline In-Reply-To: <1426798361-14982-1-git-send-email-rkrcmar@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Thu, Mar 19, 2015 at 09:52:41PM +0100, Radim Kr=C4=8Dm=C3=A1=C5=99 w= rote: > An overhead from function call is not appropriate for its size and > frequency of execution. >=20 > Suggested-by: Paolo Bonzini > Signed-off-by: Radim Kr=C4=8Dm=C3=A1=C5=99 > --- > I'm not very fond of that smp_rmb(): there is no real synchronizati= on > against update_handled_vectors(),=20 Yes, because the guest OS should provide synchronization (it should shutdown interrupts before attempting to modify IOAPIC table). The smp_wmb is necessary. > so the only point I see is to drop > cached value of handled_vectors, which seems like bad use of LFENCE= =2E test_bit has volatile on *addr, so don't see why the smp_rmb is necessary at all. Applied, thanks.