LWN.net Logo

Re: [RFC] Unify KVM kernel-space and user-space code into a single project

From:  Ingo Molnar <mingo-AT-elte.hu>
To:  Avi Kivity <avi-AT-redhat.com>
Subject:  Re: [RFC] Unify KVM kernel-space and user-space code into a single project
Date:  Mon, 22 Mar 2010 21:46:50 +0100
Cc:  Anthony Liguori <anthony-AT-codemonkey.ws>, Pekka Enberg <penberg-AT-cs.helsinki.fi>, "Zhang, Yanmin" <yanmin_zhang-AT-linux.intel.com>, Peter Zijlstra <a.p.zijlstra-AT-chello.nl>, Sheng Yang <sheng-AT-linux.intel.com>, linux-kernel-AT-vger.kernel.org, kvm-AT-vger.kernel.org, Marcelo Tosatti <mtosatti-AT-redhat.com>, oerg Roedel <joro-AT-8bytes.org>, Jes Sorensen <Jes.Sorensen-AT-redhat.com>, Gleb Natapov <gleb-AT-redhat.com>, Zachary Amsden <zamsden-AT-redhat.com>, ziteng.huang-AT-intel.com, Arnaldo Carvalho de Melo <acme-AT-redhat.com>, Fr?d?ric Weisbecker <fweisbec-AT-gmail.com>, Gregory Haskins <ghaskins-AT-novell.com>
Archive-link:  Article, Thread


* Avi Kivity <avi@redhat.com> wrote:

> On 03/22/2010 09:27 PM, Ingo Molnar wrote:
> >
> >> If your position basically boils down to, we can't trust userspace
> >> and we can always trust the kernel, I want to eliminate any
> >> userspace path, then I can't really help you out.
> >
> > Why would you want to 'help me out'? I can tell a good solution from a bad 
> > one just fine.
> 
> You are basically making a kernel implementation a requirement, instead of 
> something that follows from the requirement.

No, i'm not.

> > You should instead read the long list of disadvantages above, invert them 
> > and list then as advantages for the kernel-based vcpu enumeration 
> > solution, apply common sense and go admit to yourself that indeed in this 
> > situation a kernel provided enumeration of vcpu contexts is the most 
> > robust solution.
> 
> Having qemu enumerate guests one way or another is not a good idea IMO since 
> it is focused on one guest and doesn't have a system-wide entity.  A 
> userspace system-wide entity will work just as well as kernel 
> implementation, without its disadvantages.

A system-wide user-space entity only solves one problem out of the 4 i listed, 
still leaving the other 3:

 - Those special files can get corrupted, mis-setup, get out of sync, or can
   be hard to discover.

 - Apps might start KVM vcpu instances without adhering to the
   system-wide access method.

 - There is no guarantee for the system-wide process to reply to a request -
   while the kernel can always guarantee an enumeration result. I dont want
   'perf kvm' to hang or misbehave just because the system-wide entity has 
   hung.

Really, i think i have to give up and not try to convince you guys about this 
anymore - i dont think you are arguing constructively anymore and i dont want 
yet another pointless flamewar about this.

Please consider 'perf kvm' scrapped indefinitely, due to lack of robust KVM 
instrumentation features: due to lack of robust+universal vcpu/guest 
enumeration and due to lack of robust+universal symbol access on the KVM side. 
It was a really promising feature IMO and i invested two days of arguments 
into it trying to find a workable solution, but it was not to be.

Thanks,

	Ingo


(Log in to post comments)

Copyright © 2010, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds