Re: [PULL 0/1] Block patches

2021-10-21 Thread Richard Henderson
On 10/21/21 10:41 AM, Stefan Hajnoczi wrote: The following changes since commit afc9fcde55296b83f659de9da3cdf044812a6eeb: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2021-10-20 06:10:51 -0700) are available in the Git repository at:

[PULL 0/1] Block patches

2021-10-21 Thread Stefan Hajnoczi
The following changes since commit afc9fcde55296b83f659de9da3cdf044812a6eeb: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2021-10-20 06:10:51 -0700) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git tags/block-pull-request for you

[PULL 1/1] coroutine: resize pool periodically instead of limiting size

2021-10-21 Thread Stefan Hajnoczi
It was reported that enabling SafeStack reduces IOPS significantly (>25%) with the following fio benchmark on virtio-blk using a NVMe host block device: # fio --rw=randrw --bs=4k --iodepth=64 --runtime=1m --direct=1 \ --filename=/dev/vdb --name=job1 --ioengine=libaio --thread \

Re: [PATCH v2 0/3] virtio: increase VIRTQUEUE_MAX_SIZE to 32k

2021-10-21 Thread Christian Schoenebeck
On Freitag, 8. Oktober 2021 18:08:48 CEST Christian Schoenebeck wrote: > On Freitag, 8. Oktober 2021 16:24:42 CEST Christian Schoenebeck wrote: > > On Freitag, 8. Oktober 2021 09:25:33 CEST Greg Kurz wrote: > > > On Thu, 7 Oct 2021 16:42:49 +0100 > > > > > > Stefan Hajnoczi wrote: > > > > On

Re: [PATCH 0/3] linux-aio: allow block devices to limit aio-max-batch

2021-10-21 Thread Stefan Hajnoczi
On Thu, Sep 23, 2021 at 04:30:57PM +0200, Stefano Garzarella wrote: > Commit d7ddd0a161 ("linux-aio: limit the batch size using > `aio-max-batch` parameter") added a way to limit the batch size > of Linux AIO backend for the entire AIO context. > > The same AIO context can be shared by multiple

Re: [PATCH 3/3] linux-aio: add `dev_max_batch` parameter to laio_io_unplug()

2021-10-21 Thread Stefan Hajnoczi
On Thu, Sep 23, 2021 at 04:31:00PM +0200, Stefano Garzarella wrote: > Between the submission of a request and the unplug, other devices > with larger limits may have been queued new requests without flushing > the batch. > > Using the new `dev_max_batch` parameter, laio_io_unplug() can check > if

Re: [PATCH 2/3] linux-aio: add `dev_max_batch` parameter to laio_co_submit()

2021-10-21 Thread Stefan Hajnoczi
On Thu, Sep 23, 2021 at 04:30:59PM +0200, Stefano Garzarella wrote: > This new parameter can be used by block devices to limit the > Linux AIO batch size more than the limit set by the AIO context. > > file-posix backend supports this, passing its `aio-max-batch` option > previously added. > >

Re: [PATCH 1/3] file-posix: add `aio-max-batch` option

2021-10-21 Thread Stefan Hajnoczi
On Thu, Sep 23, 2021 at 04:30:58PM +0200, Stefano Garzarella wrote: > Commit d7ddd0a161 ("linux-aio: limit the batch size using > `aio-max-batch` parameter") added a way to limit the batch size > of Linux AIO backend for the entire AIO context. > > The same AIO context can be shared by multiple

Re: [PATCH v3 17/25] block/copy-before-write.h: global state API + assertions

2021-10-21 Thread Stefan Hajnoczi
On Tue, Oct 12, 2021 at 04:48:58AM -0400, Emanuele Giuseppe Esposito wrote: > copy-before-write functions always run under BQL lock. > > Signed-off-by: Emanuele Giuseppe Esposito > Reviewed-by: Paolo Bonzini > --- > block/copy-before-write.c | 2 ++ > block/copy-before-write.h | 7 +++ > 2

Re: [PATCH v3 24/25] job.h: split function pointers in JobDriver

2021-10-21 Thread Stefan Hajnoczi
On Tue, Oct 12, 2021 at 04:49:05AM -0400, Emanuele Giuseppe Esposito wrote: > The job API will be handled separately in another serie. > > Signed-off-by: Emanuele Giuseppe Esposito > --- > include/qemu/job.h | 16 > 1 file changed, 16 insertions(+) Reviewed-by: Stefan Hajnoczi

Re: [PATCH v3 08/25] block: introduce assert_bdrv_graph_writable

2021-10-21 Thread Stefan Hajnoczi
On Tue, Oct 12, 2021 at 04:48:49AM -0400, Emanuele Giuseppe Esposito wrote: > We want to be sure that the functions that write the child and > parent list of a bs are under BQL and drain. > > BQL prevents from concurrent writings from the GS API, while > drains protect from I/O. > > TODO: drains

Re: [PATCH v3 13/25] include/sysemu/blockdev.h: move drive_add and inline drive_def

2021-10-21 Thread Stefan Hajnoczi
On Tue, Oct 12, 2021 at 04:48:54AM -0400, Emanuele Giuseppe Esposito wrote: > drive_add is only used in softmmu/vl.c, so it can be a static > function there, and drive_def is only a particular use case of > qemu_opts_parse_noisily, so it can be inlined. > > Also remove

Re: [RFC PATCH 02/10] accel: Use qemu_security_policy_taint(), mark KVM and Xen as safe

2021-10-21 Thread Markus Armbruster
It's been a while... Daniel P. Berrangé writes: > On Thu, Sep 09, 2021 at 01:20:16AM +0200, Philippe Mathieu-Daudé wrote: >> Add the AccelClass::secure_policy_supported field to classify >> safe (within security boundary) vs unsafe accelerators. >> >> Signed-off-by: Philippe Mathieu-Daudé >>

Re: [PATCH 05/15] hw/nvme: Add support for SR-IOV

2021-10-21 Thread Lukasz Maniak
On Wed, Oct 20, 2021 at 09:07:47PM +0200, Klaus Jensen wrote: > On Oct 7 18:23, Lukasz Maniak wrote: > > This patch implements initial support for Single Root I/O Virtualization > > on an NVMe device. > > > > Essentially, it allows to define the maximum number of virtual functions > > supported

Re: [PATCH v3 11/25] include/block/blockjob.h: global state API

2021-10-21 Thread Stefan Hajnoczi
On Tue, Oct 12, 2021 at 04:48:52AM -0400, Emanuele Giuseppe Esposito wrote: > blockjob functions run always under the BQL lock. > > Signed-off-by: Emanuele Giuseppe Esposito > --- > include/block/blockjob.h | 9 + > 1 file changed, 9 insertions(+) Reviewed-by: Stefan Hajnoczi

Re: [PATCH v3 06/25] include/block/block_int: split header into I/O and global state API

2021-10-21 Thread Stefan Hajnoczi
On Tue, Oct 12, 2021 at 04:48:47AM -0400, Emanuele Giuseppe Esposito wrote: > Similarly to the previous patch, split block_int.h > in block_int-io.h and block_int-global-state.h > > block_int-common.h contains the structures shared between > the two headers, and the functions that can't be

Re: [PATCH v3 04/25] include/sysemu/block-backend: split header into I/O and global state (GS) API

2021-10-21 Thread Stefan Hajnoczi
On Tue, Oct 12, 2021 at 04:48:45AM -0400, Emanuele Giuseppe Esposito wrote: > Similarly to the previous patches, split block-backend.h > in block-backend-io.h and block-backend-global-state.h > > In addition, remove "block/block.h" include as it seems > it is not necessary anymore, together with

Re: [PATCH v3 02/25] include/block/block: split header into I/O and global state API

2021-10-21 Thread Stefan Hajnoczi
On Tue, Oct 12, 2021 at 04:48:43AM -0400, Emanuele Giuseppe Esposito wrote: > block.h currently contains a mix of functions: > some of them run under the BQL and modify the block layer graph, > others are instead thread-safe and perform I/O in iothreads. > It is not easy to understand which

Re: [PATCH 10/15] hw/nvme: Make max_ioqpairs and msix_qsize configurable in runtime

2021-10-21 Thread Łukasz Gieryk
On Wed, Oct 20, 2021 at 09:06:06PM +0200, Klaus Jensen wrote: > On Oct 7 18:24, Lukasz Maniak wrote: > > From: Łukasz Gieryk > > > > The Nvme device defines two properties: max_ioqpairs, msix_qsize. Having > > them as constants is problematic for SR-IOV support. > > > > The SR-IOV feature

[PATCH v2 4/4] iotests: add qemu-img-compare-stat test

2021-10-21 Thread Vladimir Sementsov-Ogievskiy
Test new feature qemu-img compare --stat. Signed-off-by: Vladimir Sementsov-Ogievskiy --- .../qemu-iotests/tests/qemu-img-compare-stat | 88 +++ .../tests/qemu-img-compare-stat.out | 106 ++ 2 files changed, 194 insertions(+) create mode 100755

[PATCH v2 3/4] qemu-img: add --shallow option for qemu-img compare

2021-10-21 Thread Vladimir Sementsov-Ogievskiy
Allow compare only top images of backing chains. This is useful to compare images with same backing file or to compare incremental images from the chain of incremental backups with "--stat" option. Signed-off-by: Vladimir Sementsov-Ogievskiy --- docs/tools/qemu-img.rst | 9 - qemu-img.c

[PATCH v2 1/4] qemu-img: implement compare --stat

2021-10-21 Thread Vladimir Sementsov-Ogievskiy
With new option qemu-img compare will not stop at first mismatch, but instead calculate statistics: how many clusters with different data, how many clusters with equal data, how many clusters were unallocated but become data and so on. We compare images chunk by chunk. Chunk size depends on what

[PATCH v2 2/4] qemu-img: make --block-size optional for compare --stat

2021-10-21 Thread Vladimir Sementsov-Ogievskiy
Let's detect block-size automatically if not specified by user: If both files define cluster-size, use minimum to be more precise. If both files don't specify cluster-size, use default of 64K If only one file specify cluster-size, just use it. Signed-off-by: Vladimir Sementsov-Ogievskiy ---

[PATCH v2 0/4] qemu-img compare --stat

2021-10-21 Thread Vladimir Sementsov-Ogievskiy
Hi all! v2: allow using --shallow without --stat Recently we faced the following task: Customer comes and say: incremental backup images are too fat. Does you incremental backup works correct? What to answer? We should check something. At least check that incremental images doesn't store same