From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: QEMU PIC indirection patch for in-kernel APIC work Date: Wed, 04 Apr 2007 11:43:02 -0500 Message-ID: <4613D596.7080201@codemonkey.ws> References: <4613CCD1.2070702@qumranet.com> <8FFF7E42E93CC646B632AB40643802A8025B962E@scsmsx412.amr.corp.intel.com> <64F9B87B6B770947A9F8391472E032160B318EDB@ehost011-8.exch011.intermedia.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Avi Kivity To: Dor Laor Return-path: In-Reply-To: <64F9B87B6B770947A9F8391472E032160B318EDB-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Dor Laor wrote: >>>>> This pushes towards in kernel apic too. Can't see how we avoid it. >>>>> >>>>> >>>> Does it really? IIUC, we would avoid TPR traps entirely and would >>>> just need to synchronize the TPR whenever we go down to userspace. >>>> >>>> >>> It's a bit more complex than that, as userspace would need to tell >>> > the > >>> kernel the highest priority pending interrupt so that it can program >>> the hardware to exit when an interrupt is ready. However I agree >>> with you that in principle we could split the apic emulation between >>> kvm and qemu, even with this featurette. >>> >> Most of H/W-virtualization capable processors out there don't support >> that feature today. I think the decision (kvm or qemu) should be done >> based on performance data. I'm not worried about maintenance issues; >> > the > >> APIC code is not expected to change frequently. I'm a bit worried about >> extra complexity caused by such split, though. >> >> > > I had an in-kernel-apic implementation for KVM and the performance > improvement was insignificant. It is mainly a software engineering > thing. > PV drivers can benefit from APIC in the kernel but again just a mere > improvement. > > > >> BTW, I see CPU utilization of qemu is almost always 99% in the top >> command when I run kernel build in an x86-64 Linux guest. >> > > > What does qemu do? > > Idle guest hardly consume cpu, especially KVM powered. > qemu would be 99% even if all the time is being spent in the guest context. If the user time is high, an oprofile run would be pretty useful. I've found that the VGA drawing routines can be pretty expensive. Regards, Anthony Liguori >> Jun >> --- >> Intel Open Source Technology Center >> > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV