History log of /kvmtool/disk/blk.c (Results 1 – 9 of 9)
Revision Date Author Comments
# 2790307c 04-Apr-2019 Jean-Philippe Brucker <jean-philippe.brucker@arm.com>

disk/aio: Add wait() disk operation

Add a call into the disk layer to synchronize the AIO queue. Wait for all
pending requests to complete. This will be necessary when resetting a
virtqueue.

The wa

disk/aio: Add wait() disk operation

Add a call into the disk layer to synchronize the AIO queue. Wait for all
pending requests to complete. This will be necessary when resetting a
virtqueue.

The wait() operation isn't the same as flush(). A VIRTIO_BLK_T_FLUSH
request ensures that any write request *that completed before the FLUSH is
sent* is committed to permanent storage (e.g. written back from a write
cache). But it doesn't do anything for requests that are still pending
when the FLUSH is sent.

Avoid introducing a mutex on the io_submit() and io_getevents() paths,
because it can lead to 30% throughput drop on heavy FIO jobs. Instead
manage an inflight counter using compare-and-swap operations, which is
simple enough as the caller doesn't submit new requests while it waits for
the AIO queue to drain. The __sync_fetch_and_* operations are a bit rough
since they use full barriers, but that didn't seem to introduce a
performance regression.

Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>

show more ...


# d62e8ee0 04-Apr-2019 Jean-Philippe Brucker <jean-philippe.brucker@arm.com>

disk/aio: Fix use of disk->async

Add an 'async' attribute to disk_image_operations, that describes if they
can submit async I/O or not. disk_image->async is now set iff
CONFIG_HAS_AIO and the ops do

disk/aio: Fix use of disk->async

Add an 'async' attribute to disk_image_operations, that describes if they
can submit async I/O or not. disk_image->async is now set iff
CONFIG_HAS_AIO and the ops do use AIO.

This fixes qcow1, which used to set async = 1 even though the qcow
operations don't use AIO. The disk core would perform the read/write
operation without pushing the completion onto the virtio queue, and the
guest would be stuck waiting.

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 ...


# 5236b505 03-Aug-2012 Asias He <asias.hejun@gmail.com>

kvm tools: Enable O_DIRECT support

With Direct I/O, file reads and writes go directly from the applications
to the storage device, bypassing the operating system read and write
caches. This is usefu

kvm tools: Enable O_DIRECT support

With Direct I/O, file reads and writes go directly from the applications
to the storage device, bypassing the operating system read and write
caches. This is useful for applications that manage their own caches.

Open a disk image with O_DIRECT:
$ lkvm run -d ~/img/test.img,direct

The original readonly flag is still supported.
Open a disk image with O_DIRECT and readonly:
$ lkvm run -d ~/img/test.img,direct,ro

Signed-off-by: Asias He <asias.hejun@gmail.com>
Acked-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# dcd3cd8e 04-Jun-2012 Asias He <asias.hejun@gmail.com>

kvm tools: Simplify disk read write function name

We read and write in sectors by default. It makes little sense to add
the extra _sector string for read and write ops/function name.

Signed-off-by:

kvm tools: Simplify disk read write function name

We read and write in sectors by default. It makes little sense to add
the extra _sector string for read and write ops/function name.

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 58fd2b7b 12-Apr-2012 Asias He <asias.hejun@gmail.com>

kvm tools: Make raw block device work

Previously, we use mmaped host root partition as guest's root
filesystem. As virtio-9p based root filesystem is supported,
mmaped host root partition approach i

kvm tools: Make raw block device work

Previously, we use mmaped host root partition as guest's root
filesystem. As virtio-9p based root filesystem is supported,
mmaped host root partition approach is not used anymore.

It is useful to use raw block device as guest's disk backend for some
user. e.g. bypass host's fs layer.

This patch makes raw block device work as disk image, user can do
read/write on raw block device, by using DISK_IMAGE_REGULAR instead of
DISK_IMAGE_MMAP for block device

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 9f9207c5 19-Dec-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Fixes for disk image module

Fixes include:
- Error handling
- Cleanup
- Standard init/uninit

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>


# 063e87a0 18-May-2011 Asias He <asias.hejun@gmail.com>

kvm tools: Rename raw_image_ops to blk_dev_ops

This patch also adds some comments to disk/blk.c

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>


# 87ee33c8 18-May-2011 Asias He <asias.hejun@gmail.com>

kvm tools: Rename struct disk_image_operations ops name for raw image

This patch renames:

raw_image__read_sector_ro_mmap to raw_image__read_sector
raw_image__write_sector_ro_mmap to raw_image__writ

kvm tools: Rename struct disk_image_operations ops name for raw image

This patch renames:

raw_image__read_sector_ro_mmap to raw_image__read_sector
raw_image__write_sector_ro_mmap to raw_image__write_sector
raw_image__close_ro_mmap to raw_image__close

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 708dc6cb 18-May-2011 Asias He <asias.hejun@gmail.com>

kvm tools: Split blk device code from raw.c to blk.c

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>