Re: [PATCH] docs: more on qemu locking patterns

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

 



On Tue, Feb 01, 2011 at 05:37:10PM -0700, Eric Blake wrote:
> * src/qemu/THREADS.txt: Improve documentation.
> ---
> 
> I'm trying to make sure we don't have any qemu locking gotchas,
> given that I've had a bug report of a qemu monitor callback
> being able to result in a domaing being unreferenced while
> in the middle of another command.  As a first shot, I found that
> our documentation needed some help.
> 
> Also, I have a question.  I updated the documentation to match
> existing code:
> 
>    qemuDomainObjExitMonitor()
> -    - Acquires the virDomainObjPtr lock
>      - Releases the qemuMonitorObjPtr lock
> +    - Acquires the virDomainObjPtr lock
> 
> But I'm wondering if that was correct, or if the code should instead
> be swapped to match the original ordering in the documentation.

Either way doesn't matter. The lock ordering constraints only
apply to sequences of 'lock' operations. You can 'unlock' any
lock in any order, providing you always honour the 'lock'
order. So changing the docs is fine.

>  src/qemu/THREADS.txt |  100 ++++++++++++++++++++++++++++++++++++++-----------
>  1 files changed, 77 insertions(+), 23 deletions(-)

ACK

Daniel

--
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]