]> git.ipfire.org Git - thirdparty/libvirt.git/commit
daemon: Create priority workers pool
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 12 Aug 2011 12:04:31 +0000 (14:04 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 5 Sep 2011 16:14:08 +0000 (18:14 +0200)
commit597fe3cee68f561a181967b59a87b4e5c5880c4c
tree6f51c1b3c1b7acaabe61bfbd91d7d7c575a2b358
parent63379890896d757a8a450667375892ab2f762fc7
daemon: Create priority workers pool

This patch annotates APIs with low or high priority.
In low set MUST be all APIs which might eventually access monitor
(and thus block indefinitely). Other APIs may be marked as high
priority. However, some must be (e.g. domainDestroy).

For high priority calls (HPC), there are some high priority workers
(HPW) created in the pool. HPW can execute only HPC, although normal
worker can process any call regardless priority. Therefore, only those
APIs which are guaranteed to end in reasonable small amount of time
can be marked as HPC.

The size of this HPC pool is static, because HPC are expected to end
quickly, therefore jobs assigned to this pool will be served quickly.
It can be configured in libvirtd.conf via prio_workers variable.
Default is set to 5.

To mark API with low or high priority, append priority:{low|high} to
it's comment in src/remote/remote_protocol.x. This is similar to
autogen|skipgen. If not marked, the generator assumes low as default.
14 files changed:
daemon/libvirtd.aug
daemon/libvirtd.c
daemon/libvirtd.conf
src/qemu/qemu_driver.c
src/qemu/qemu_process.c
src/remote/qemu_protocol.x
src/remote/remote_protocol.x
src/rpc/gendispatch.pl
src/rpc/virnetserver.c
src/rpc/virnetserver.h
src/rpc/virnetserverprogram.c
src/rpc/virnetserverprogram.h
src/util/threadpool.c
src/util/threadpool.h