4 Commits

Author SHA1 Message Date
Sasha Levin 1664498d4a kvm tools: Add aio read write functions
This patch adds basic native vectored AIO functions.

These functions should be optimized to process multiple io
requests at once.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
2015-06-01 16:39:48 +01:00
Sasha Levin 1547507fa3 kvm tools: Add scatter-gather variants of IO functions
Added scatter-gather variants of [x,xp][read,write]() and [p]read_in_full().

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
2015-06-01 16:39:42 +01:00
Pekka Enberg 6b7deb024d kvm tools: Use pread() and pwrite() in disk-image.c
This patch convert lseek() + read()/write() pairs with pread()/pwrite(). The
performance of running the following command

  dd if=/dev/vda of=/dev/null

in the guest does not show significant performance differences but should be a
net win because of the reduction in system calls.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
2015-06-01 16:39:41 +01:00
Pekka Enberg c4d7847b22 kvm tools: Fix large disk images on 32-bit
Use read()/write() instead of mmap() for virtio block device emulation to
support large disk images on 32-bit.

Reported-and-tested-by: Asias He <asias.hejun@gmail.com>
Tested-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
2015-06-01 16:39:41 +01:00