[libvirt] [PATCHv3 1.5/2] qemu: drop driver lock while trying to terminate qemu process
eblake at redhat.com
Tue Feb 7 18:34:58 UTC 2012
On 02/07/2012 10:18 AM, Laine Stump wrote:
> In the meantime, we still should work on Dan's proposal to make
> locking within the driver object more fine grained.
If only I ever had enough 'round tuits'.
> (NB: although I couldn't find any instance where qemuProcessKil() was
> called with no jobs active for the domain (or some other guarantee
> that the current thread had at least one refcount on the domain
> object), this patch still follows Eric's method of temporarily adding
> a ref prior to unlocking the domain object, because I couldn't
> convince myself 100% that this was the case.)
Yeah, and that's probably best for future-proofing against other changes
in the code base.
Another one of those projects where I wish I had more time is the
introduction of a virObject 'base' class, with ref-counting done by
lightweight atomic operations rather than heavy-weight mutex syscalls,
which would be the sort of rewrite where we could easily be altering
whether callers also hold a reference.
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 620 bytes
Desc: OpenPGP digital signature
More information about the libvir-list