qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH] hook cpu running at a higher level.


From: Ian Jackson
Subject: Re: [Qemu-devel] Re: [PATCH] hook cpu running at a higher level.
Date: Tue, 30 Dec 2008 17:25:17 +0000

Glauber Costa writes ("Re: [Qemu-devel] Re: [PATCH] hook cpu running at a 
higher level."):
> On Tue, Dec 30, 2008 at 8:24 AM, Ian Jackson
> > The Xen qemu process runs only in one thread which is fine because it
> > doesn't need to be involved with actual processor execution.  In
> > theory parallel execution (in different threads and thus on different
> > physical cpus) of IO emulations requested by different guest vcpus
> > might make some small performance difference but I doubt it would be
> > worth our while.  So I think the Xen setup will still from qemu's
> > point of view look like a single vcpu no matter how many vcpus the
> > guest aactually has.
> 
> Is it one vcpu or various in lockstep ? If you have only one vcpu,
> your main loop can be even simpler than qemu's, which holds them all
> in a for loop.

Whether it's one vcpu or several depends how you think about it.  The
guest and Xen see several vcpus, which execute (without any
involvement from qemu) on the various physical cpus according to the
Xen hypervisor's scheduler.  qemu only sees one vcpu object which
appears to generate all of the IO requests.

Our main loop is really just
  read io request from magic fd
  call cpu_something_rw which eventually calls appropriate io emulation
  send response to io request (ack or any data `read') back to magic fd
so yes it is very simple.

Execution of the guest's vcpus happens asynchronously (from qemu's
point of view) until they need to do IO; then the hypervisor passes
the request to qemu and stops the vcpu (by not scheduling it) until it
gets a response from qemu.  While no IO requests are being processed,
qemu sleeps.

Ian.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]