Re: [PATCH] Add migration APIs for libxl driver

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

 



On 03/16/2012 11:53 AM, Jim Fehlig wrote:

> 
> Question for other libvirt devs:
> 
> Many of the libxl driver functions use this pattern
>  - lock driver
>  - vm = virDomainFindByUUID // acquires dom obj lock
>  - unlock driver
>  - do stuff
> - virDomainObjUnlock
> 
> In some cases, "do stuff" requires obtaining the driver lock (e.g.
> removing a domain from driver's domain list), in which case there is
> potential for deadlock.  Any suggestions for preventing the deadlock
> *and* avoiding locking the driver during long running operations?

See src/qemu/THREADS.txt.  That gives the details on how to drop the
driver lock and even the domain object lock, by maintaining a reference
count and job condition on each domain to ensure that others can still
use the driver, just not for the domain whose job is still occupied.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]