]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
conf: Rework virDomainObjListFindByUUID to allow more concurrent APIs
authorMartin Kletzander <mkletzan@redhat.com>
Tue, 2 Dec 2014 07:33:33 +0000 (08:33 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Tue, 16 Dec 2014 14:50:49 +0000 (15:50 +0100)
commitfeb1a4d792e1c35b1009e69c00bf351b39fe666b
treec0fa04832b12eaa5ddbe4926147c64030eeeacc5
parentd2632d60aa86f5f214eba2a10d338beb3b7722ca
conf: Rework virDomainObjListFindByUUID to allow more concurrent APIs

Currently, when there is an API that's blocking with locked domain and
second API that's waiting in virDomainObjListFindByUUID() for the domain
lock (with the domain list locked) no other API can be executed on any
domain on the whole hypervisor because all would wait for the domain
list to be locked.  This patch adds new optional approach to this in
which the domain is only ref'd (reference counter is incremented)
instead of being locked and is locked *after* the list itself is
unlocked.  We might consider only ref'ing the domain in the future and
leaving locking on particular APIs, but that's no tonight's fairy tale.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/conf/domain_conf.c
src/conf/domain_conf.h
src/libvirt_private.syms