[libvirt] In libxl_driver, how to lock/unlock objects while doing an operation that runs for a long time?

Jim Fehlig jfehlig at suse.com
Thu May 10 23:48:10 UTC 2012


Daniel P. Berrange wrote:
> On Thu, May 10, 2012 at 11:20:20PM +0800, Oscar Ben wrote:
>   
>> In the discussion :
>>          http://thread.gmane.org/gmane.comp.emulators.libvirt/53534
>>
>> People mentioned about long-term operations' LOCKs there. It seems that, in
>> libxl_driver, certain opeations may hold a lock for too long, thus other
>> operations, even those just do query jobs, would be blocked.
>>
>> In qemu_driver, there seems to be a more complexy way to solve this
>> problem, by employing a condition variable.
>>     
>
> Yep, that's pretty much the approach we'd want to take for libxl too
> I believe.
>   

Agreed.

Chunyan, the author of the patch Oscar mentions, is on maternity leave
now.  Bamvor (cc'd) is becoming familiar with the patch, review
comments, etc. and will submit a new version.  Part of that work will
need to include addressing the locking issues noted in the thread.

Regards,
Jim




More information about the libvir-list mailing list