#
30a9aa69 |
| 04-Apr-2019 |
Jean-Philippe Brucker <jean-philippe.brucker@arm.com> |
disk/aio: Refactor AIO code
Move all AIO code to a separate file, disk/aio.c, to remove as much #ifdefs as possible. Split the raw read/write disk ops into async and sync, and choose which ones to u
disk/aio: Refactor AIO code
Move all AIO code to a separate file, disk/aio.c, to remove as much #ifdefs as possible. Split the raw read/write disk ops into async and sync, and choose which ones to use depending on CONFIG_HAS_AIO. Note that we fix raw_image__close() which incorrectly checked CONFIG_HAS_VIRTIO instead of CONFIG_HAS_AIO, and closed an unitialized disk->evt. A subsequent commit will complete this refactoring by fixing use of the 'async' disk attribute.
Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
show more ...
|
#
649f9515 |
| 30-Oct-2015 |
Andre Przywara <andre.przywara@arm.com> |
provide generic read_file() implementation
In various parts of kvmtool we simply try to read files into memory, but fail to do so in a safe way. The read(2) syscall can return early having only part
provide generic read_file() implementation
In various parts of kvmtool we simply try to read files into memory, but fail to do so in a safe way. The read(2) syscall can return early having only parts of the file read, or it may return -1 due to being interrupted by a signal (in which case we should simply retry). The ARM code seems to provide the only safe implementation, so take that as an inspiration to provide a generic read_file() function usable by every part of kvmtool.
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
show more ...
|
#
0ecc970f |
| 04-Jun-2012 |
Asias He <asias.hejun@gmail.com> |
kvm tools: Restart io_submit if it returns EAGAIN
Keep trying if io_submit returns EAGAIN. No need to fail the request.
Signed-off-by: Asias He <asias.hejun@gmail.com> Signed-off-by: Pekka Enberg <
kvm tools: Restart io_submit if it returns EAGAIN
Keep trying if io_submit returns EAGAIN. No need to fail the request.
Signed-off-by: Asias He <asias.hejun@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
53da264d |
| 12-Dec-2011 |
Lai Jiangshan <laijs@cn.fujitsu.com> |
kvm tools: move read-write.c to util/
read-write.c contains no kvm related code, it is just a lib.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Pekka Enberg <penberg@kernel.or
kvm tools: move read-write.c to util/
read-write.c contains no kvm related code, it is just a lib.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
1664498d |
| 02-Nov-2011 |
Sasha Levin <levinsasha928@gmail.com> |
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
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>
show more ...
|
#
f42cd9cc |
| 12-Jul-2011 |
Pekka Enberg <penberg@kernel.org> |
kvm tools: Use writev() in xwritev()
This patch fixes a typo in xwritev(). Luckily the function is not used so the problem is only latent. Spotted during code review.
Cc: Sasha Levin <levinsasha928
kvm tools: Use writev() in xwritev()
This patch fixes a typo in xwritev(). Luckily the function is not used so the problem is only latent. Spotted during code review.
Cc: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
150aa4c0 |
| 17-May-2011 |
Pekka Enberg <penberg@kernel.org> |
kvm tools: Fix includes for preadv/pwritev
"bornto befrag <born2befrag@gmail.com>" writes:
> When i compile i kvm native tool tools/kvm && make i get this > > CC read-write.o > cc1:
kvm tools: Fix includes for preadv/pwritev
"bornto befrag <born2befrag@gmail.com>" writes:
> When i compile i kvm native tool tools/kvm && make i get this > > CC read-write.o > cc1: warnings being treated as errors > read-write.c: In function ‘xpreadv’: > read-write.c:255: error: implicit declaration of function ‘preadv’ > read-write.c:255: error: nested extern declaration of ‘preadv’ > read-write.c: In function ‘xpwritev’: > read-write.c:268: error: implicit declaration of function ‘pwritev’ > read-write.c:268: error: nested extern declaration of ‘pwritev’ > make: *** [read-write.o] Error 1
Fix that up by including <sys/uio.h> for preadv()/pwritev(). Reported-by: <born2befrag@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
4c0205d0 |
| 16-Apr-2011 |
Sasha Levin <levinsasha928@gmail.com> |
kvm tools: Fix iov shifting
Use helper function to remove full iov when 'reading in full'.
Thanks Konstantin Khlebnikov.
[ penberg@kernel.org: fix formatting ] Signed-off-by: Sasha Levin <levinsas
kvm tools: Fix iov shifting
Use helper function to remove full iov when 'reading in full'.
Thanks Konstantin Khlebnikov.
[ penberg@kernel.org: fix formatting ] Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
1547507f |
| 16-Apr-2011 |
Sasha Levin <levinsasha928@gmail.com> |
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-b
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>
show more ...
|
#
6b7deb02 |
| 08-Apr-2011 |
Pekka Enberg <penberg@kernel.org> |
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=/de
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>
show more ...
|
#
c4d7847b |
| 31-Mar-2011 |
Pekka Enberg <penberg@kernel.org> |
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.hej
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>
show more ...
|