]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kvm tools: Use threadpool for virtio-blk
authorSasha Levin <levinsasha928@gmail.com>
Thu, 28 Apr 2011 13:40:43 +0000 (16:40 +0300)
committerPekka Enberg <penberg@kernel.org>
Thu, 28 Apr 2011 17:52:53 +0000 (20:52 +0300)
commit5dfe35ac8f47bf7582d30215cdf99213b2119242
treee69530ddca620b462587daec6820b0c1f2cd4e52
parent704c93e66523476aad99133e91d7cccbadfe6a43
kvm tools: Use threadpool for virtio-blk

virtio-blk has been converted to use the threadpool. All the threading code has
been removed, which left only simple callback handling code.

New threadpool job types are created within VIRTIO_PCI_QUEUE_PFN for every
queue (just one in the case of virtio-blk).  The module signals for work after
receiving VIRTIO_PCI_QUEUE_NOTIFY and expects the threadpool to call
virtio_blk_do_io to handle the I/O.  It is possible that the module will signal
work several times while virtio_blk_do_io is already working, but there is no
need to handle multithreading there since the threadpool will call each job in
linear and not in parallel.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/virtio-blk.c