]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kvm tools: Improve virtio blk request processing
authorAsias He <asias.hejun@gmail.com>
Mon, 28 Nov 2011 05:34:11 +0000 (13:34 +0800)
committerPekka Enberg <penberg@kernel.org>
Mon, 28 Nov 2011 20:50:53 +0000 (22:50 +0200)
commitb7b038d41a20ab93d98ecc897ecac6b8c2e2cbd6
tree519a8a4eef398be8dbae0374eeccf58a2917dfb2
parentbe778308e879d3529e92fb4fecebde48fcafc6a5
kvm tools: Improve virtio blk request processing

There are at most bdev->reqs[VIRTIO_BLK_QUEUE_SIZE] outstanding requests
at any time.  We can simply use the head of each request to fetch the
right 'struct blk_dev_req' in bdev->reqs[].

So, we can eliminate the list and lock operations which introduced by
virtio_blk_req_{pop, push}.

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/include/kvm/virtio.h
tools/kvm/virtio/blk.c
tools/kvm/virtio/core.c