qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [RFC] make cpu creation happen inside the right thread.


From: Glauber Costa
Subject: [Qemu-devel] Re: [RFC] make cpu creation happen inside the right thread.
Date: Tue, 3 Nov 2009 15:56:53 -0200
User-agent: Jack Bauer

On Tue, Nov 03, 2009 at 03:46:07PM -0200, Marcelo Tosatti wrote:
> On Tue, Nov 03, 2009 at 12:35:08PM -0200, Glauber Costa wrote:
> > Right now, we issue cpu creation from the i/o thread, and then shoot a 
> > thread
> > from inside that code. Over the last months, a lot of subtle bugs were 
> > reported,
> > usually arising from the very fragile order of that initialization.
> > 
> > I propose we rethink that a little. This is a patch that received basic 
> > testing
> > only, and I'd  like to hear on the overall direction. The idea is to issue 
> > the new
> > thread as early as possible. The first direct benefits I can identify are 
> > that
> > we no longer have to rely at on_vcpu-like schemes for issuing vcpu ioctls, 
> > since
> > we are already on the right thread. Apic creation has far less spots for 
> > race
> > conditions as well.
> > 
> > I am implementing this on qemu-kvm first, since we can show the benefits of 
> > it
> > a bit better in there (since we already support smp)
> > 
> > Let me know what you guys think
> 
> Makes sense to me. You still need on_vcpu for issuing vcpu ioctls though
> (after initialization).

Yes, but I believe we can avoid most of them. There is a performance hit of 
using
it, but I am not so concerned with that. The nasty races that arises from it, 
are
more a concern to me.




reply via email to

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