Re: [PATCH v2] virtio: add VIRTQUEUE_ERROR QAPI event

2023-09-13 Thread Denis Plotnikov
Reviewed-by: Denis Plotnikov On 9/12/23 20:57, Vladimir Sementsov-Ogievskiy wrote: For now we only log the vhost device error, when virtqueue is actually stopped. Let's add a QAPI event, which makes possible: - collect statistics of such errors - make immediate actions: take core dumps

[PING][PATCH v5] qapi/qmp: Add timestamps to qmp command responses

2023-05-10 Thread Denis Plotnikov
Hi all! It seems that this series has come through a number of reviews and got some "reviewed-by". Is there any flaws to fix preventing to merge this series? Thanks, Denis On 26.04.2023 17:08, Denis Plotnikov wrote: Add "start" & "end" time values to

[PATCH v5] qapi/qmp: Add timestamps to qmp command responses

2023-04-26 Thread Denis Plotnikov
quot;: true}} The response of the QMP command contains the start & end time of the QMP command processing. Also, "start" & "end" timestaps are added to qemu guest agent responses as qemu-ga shares the same code for request dispatching. Suggested-by: Andrey Ryab

[PING] [PATCH v4] qapi/qmp: Add timestamps to qmp command responses

2023-01-16 Thread Denis Plotnikov
On 10.01.2023 13:32, Denis Plotnikov wrote: [ping] On 01.11.2022 18:37, Denis Plotnikov wrote: Add "start" & "end" time values to QMP command responses. These time values are added to let the qemu management layer get the exact command execution time without any o

Re: [PATCH v4] qapi/qmp: Add timestamps to qmp command responses

2023-01-10 Thread Denis Plotnikov
[ping] On 01.11.2022 18:37, Denis Plotnikov wrote: Add "start" & "end" time values to QMP command responses. These time values are added to let the qemu management layer get the exact command execution time without any other time variance which might be brought by o

[PATCH v4] qapi/qmp: Add timestamps to qmp command responses

2022-11-01 Thread Denis Plotnikov
quot;: true}} The response of the QMP command contains the start & end time of the QMP command processing. Also, "start" & "end" timestaps are added to qemu guest agent responses as qemu-ga shares the same code for request dispatching. Suggested-by: Andrey Ryabinin

Re: [PATCH v3] qapi/qmp: Add timestamps to qmp command responses

2022-10-16 Thread Denis Plotnikov
Armbruster wrote: Denis Plotnikov writes: Add "start" & "end" time values to qmp command responses. Please spell it QMP. More of the same below. These time values are added to let the qemu management layer get the exact command execution time without any other t

Re: [PATCH v3] qapi/qmp: Add timestamps to qmp command responses

2022-10-14 Thread Denis Plotnikov
On 13.10.2022 18:00, Markus Armbruster wrote: Denis Plotnikov writes: Add "start" & "end" time values to qmp command responses. Please spell it QMP. More of the same below. ok Can you tell me about a problem you cracked (or could have cracked) with the

[PATCH v3] qapi/qmp: Add timestamps to qmp command responses

2022-10-11 Thread Denis Plotnikov
econds": 1650367305, "microseconds": 831012}, "return": {"status": "running", "singlestep": false, "running": true}} The responce of the qmp command contains the start & end time of the qmp command processing. Suggeste

[PATCH v2] qapi/qmp: Add timestamps to qmp command responses

2022-10-11 Thread Denis Plotnikov
econds": 1650367305, "microseconds": 831012}, "return": {"status": "running", "singlestep": false, "running": true}} The responce of the qmp command contains the start & end time of the qmp command processing. Sugge

[PATCH v1] qapi/qmp: Add timestamps to qmp command responses

2022-10-07 Thread Denis Plotnikov
econds": 1650367305, "microseconds": 831012}, "return": {"status": "running", "singlestep": false, "running": true}} The responce of the qmp command contains the start & end time of the qmp command processing. Sugge

Re: [patch v0] qapi/qmp: Add timestamps to qmp command responses.

2022-09-27 Thread Denis Plotnikov
On 27.09.2022 09:04, Markus Armbruster wrote: Daniel P. Berrangé writes: On Mon, Sep 26, 2022 at 12:59:40PM +0300, Denis Plotnikov wrote: Add "start" & "end" timestamps to qmp command responses. It's disabled by default, but can be enabled with 'timestamp=on'

[patch v0] qapi/qmp: Add timestamps to qmp command responses.

2022-09-26 Thread Denis Plotnikov
{"status": "running", "singlestep": false, "running": true}} The responce of the qmp command contains the start & end time of the qmp command processing. These times may be helpful for the management layer in understanding of the actual timeline of a qmp

[PING][Ping] [PATCH v1 0/2] vl: flush all task from rcu queue before exiting

2021-11-24 Thread Denis Plotnikov
ping ping On 19.11.2021 12:42, Denis Plotnikov wrote: Ping! On 15.11.2021 12:41, Denis Plotnikov wrote: v1 -> v0: * move monitor cleanup to the very end of qemu cleanup [Paolo] The goal is to notify management layer about device destruction on qemu shutdown. Without this ser

[Ping] [PATCH v1 0/2] vl: flush all task from rcu queue before exiting

2021-11-19 Thread Denis Plotnikov
Ping! On 15.11.2021 12:41, Denis Plotnikov wrote: v1 -> v0: * move monitor cleanup to the very end of qemu cleanup [Paolo] The goal is to notify management layer about device destruction on qemu shutdown. Without this series DEVICE_DELETED event may not be sent because of stuck ta

[PATCH v1 2/2] vl: flush all task from rcu queue before exiting

2021-11-15 Thread Denis Plotnikov
a new rcu intreface function right before qemu main thread exit. Signed-off-by: Denis Plotnikov --- include/qemu/rcu.h | 1 + softmmu/runstate.c | 2 ++ util/rcu.c | 12 3 files changed, 15 insertions(+) diff --git a/include/qemu/rcu.h b/include/qemu/rcu.h index 515d327cf11c

[PATCH v1 1/2] monitor: move monitor destruction to the very end of qemu cleanup

2021-11-15 Thread Denis Plotnikov
. Signed-off-by: Denis Plotnikov --- monitor/monitor.c | 6 ++ softmmu/runstate.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/monitor/monitor.c b/monitor/monitor.c index 21c7a68758f5..b04ae4850db2 100644 --- a/monitor/monitor.c +++ b/monitor/monitor.c @@ -605,11

[PATCH v1 0/2] vl: flush all task from rcu queue before exiting

2021-11-15 Thread Denis Plotnikov
own because the rcu not always have enough time to run them. Denis Plotnikov (2): monitor: move monitor destruction to the very end of qemu cleanup vl: flush all task from rcu queue before exiting include/qemu/rcu.h | 1 + monitor/monitor.c | 6 ++ softmmu/runstate.c | 4 +++- u

Re: [Ping][PATCH v0] vl: flush all task from rcu queue before exiting

2021-11-10 Thread Denis Plotnikov
On 09.11.2021 20:46, Paolo Bonzini wrote: On 11/9/21 08:23, Denis Plotnikov wrote: Ping ping! Looks good, but can you explain why it's okay to call it before qemu_chr_cleanup() and user_creatable_cleanup()? I think a better solution to the ordering problem would be:   qemu_chr_cleanup

[Ping][PATCH v0] vl: flush all task from rcu queue before exiting

2021-11-08 Thread Denis Plotnikov
Ping ping! On 02.11.2021 16:39, Denis Plotnikov wrote: The device destruction may superimpose over qemu shutdown. In this case some management layer, requested a device unplug and waiting for DEVICE_DELETED event, may never get this event. This happens because device_finalize() may never

Re: [PATCH v0] vl: flush all task from rcu queue before exiting

2021-11-02 Thread Denis Plotnikov
On 02.11.2021 16:39, Denis Plotnikov wrote: The device destruction may superimpose over qemu shutdown. In this case some management layer, requested a device unplug and waiting for DEVICE_DELETED event, may never get this event. This happens because device_finalize() may never be called

[PATCH v0] vl: flush all task from rcu queue before exiting

2021-11-02 Thread Denis Plotnikov
a new rcu intreface function right before qemu main thread exit. Signed-off-by: Denis Plotnikov --- include/qemu/rcu.h | 1 + softmmu/runstate.c | 3 +++ util/rcu.c | 12 3 files changed, 16 insertions(+) diff --git a/include/qemu/rcu.h b/include/qemu/rcu.h index

[PATCH v0 1/2] vhost-user-blk: add a new vhost-user-virtio-blk type

2021-10-04 Thread Denis Plotnikov
iety of qemu device related constraints out of box. Signed-off-by: Denis Plotnikov --- hw/block/vhost-user-blk.c | 63 ++ include/hw/virtio/vhost-user-blk.h | 2 + 2 files changed, 65 insertions(+) diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-

[PATCH v0 2/2] vhost-user-blk-pci: add new pci device type to support vhost-user-virtio-blk

2021-10-04 Thread Denis Plotnikov
To allow the recently added vhost-user-virtio-blk work via virtio-pci. This patch refactors the vhost-user-blk-pci object model to reuse the existing code. Signed-off-by: Denis Plotnikov --- hw/virtio/vhost-user-blk-pci.c | 43 +++--- 1 file changed, 40 insertions

[PATCH v0 0/2] virtio-blk and vhost-user-blk cross-device migration

2021-10-04 Thread Denis Plotnikov
e to differ the new virtio-blk-compatible vhost-user-blk device from the existing non-compatible one using qemu machinery without any other modifiactions. That gives all the variety of qemu device related constraints out of box. 0001: adds new type "vhost-user-virtio-blk" 0002: add new

[PATCH v0] machine: remove non existent device tuning

2021-09-09 Thread Denis Plotnikov
on old binaries (before the original patch) - seg_max is always 126 * on new binaries - seg_max is queue-size dependent Replacing the line will split the behavior of new binaries into two. This would make an investigation in case of related problems harder. To not make things worse, this patch just

Re: [PATCH v1 2/4] virtio: increase virtuqueue size for virtio-scsi and virtio-blk

2021-09-09 Thread Denis Plotnikov
On 09.09.2021 11:28, Stefano Garzarella wrote: On Wed, Sep 08, 2021 at 06:20:49PM +0300, Denis Plotnikov wrote: On 08.09.2021 16:22, Stefano Garzarella wrote: Message bounced, I use new Denis's email address. On Wed, Sep 08, 2021 at 03:17:16PM +0200, Stefano Garzarella wrote: Hi Denis, I

Re: [PATCH v1 2/4] virtio: increase virtuqueue size for virtio-scsi and virtio-blk

2021-09-08 Thread Denis Plotnikov
introduce two different behaviors for VMs with "hw_compat_4_2" and older. So, I'd choose the lesser of two evils and keep the things like it's now. Thanks! Denis On Fri, Feb 07, 2020 at 11:48:05AM +0300, Denis Plotnikov wrote: On 05.02.2020 14:19, Stefan Hajnoczi wrote: On Tue, Feb

[PING][PING] [PATCH v4] vhost: make SET_VRING_ADDR, SET_FEATURES send replies

2021-08-16 Thread Denis Plotnikov
On 12.08.2021 11:04, Denis Plotnikov wrote: On 09.08.2021 13:48, Denis Plotnikov wrote: On vhost-user-blk migration, qemu normally sends a number of commands to enable logging if VHOST_USER_PROTOCOL_F_LOG_SHMFD is negotiated. Qemu sends VHOST_USER_SET_FEATURES to enable buffers logging

[PING] [PATCH v4] vhost: make SET_VRING_ADDR, SET_FEATURES send replies

2021-08-12 Thread Denis Plotnikov
On 09.08.2021 13:48, Denis Plotnikov wrote: On vhost-user-blk migration, qemu normally sends a number of commands to enable logging if VHOST_USER_PROTOCOL_F_LOG_SHMFD is negotiated. Qemu sends VHOST_USER_SET_FEATURES to enable buffers logging and VHOST_USER_SET_VRING_ADDR per each started ring

Re: [PATCH v3] vhost: make SET_VRING_ADDR, SET_FEATURES send replies

2021-08-09 Thread Denis Plotnikov
On 09.08.2021 12:34, Michael S. Tsirkin wrote: Looks good. Some cosmetics: all comments addressed in already sent v4 On Mon, Aug 09, 2021 at 12:03:30PM +0300, Denis Plotnikov wrote: On vhost-user-blk migration, qemu normally sends a number of commands to enable logging

[PATCH v4] vhost: make SET_VRING_ADDR, SET_FEATURES send replies

2021-08-09 Thread Denis Plotnikov
estination. The same scenario is applicable for "used ring" data logging, which is turned on with VHOST_USER_SET_VRING_ADDR command. To resolve this issue, this patch makes qemu wait for the command result explicitly if VHOST_USER_PROTOCOL_F_REPLY_ACK is negotiated and logging enabled.

[PATCH v3] vhost: make SET_VRING_ADDR, SET_FEATURES send replies

2021-08-09 Thread Denis Plotnikov
estination. The same scenario is applicable for "used ring" data logging, which is turned on with VHOST_USER_SET_VRING_ADDR command. To resolve this issue, this patch makes qemu wait for the commands result explicilty if VHOST_USER_PROTOCOL_F_REPLY_ACK is negotiated and logging enabled.

Re: [PATCH v2] vhost: make SET_VRING_ADDR, SET_FEATURES send replies

2021-08-09 Thread Denis Plotnikov
On 03.08.2021 18:05, Michael S. Tsirkin wrote: On Mon, Jul 19, 2021 at 05:21:38PM +0300, Denis Plotnikov wrote: On vhost-user-blk migration, qemu normally sends a number of commands to enable logging if VHOST_USER_PROTOCOL_F_LOG_SHMFD is negotiated. Qemu sends VHOST_USER_SET_FEATURES

[PING][PING][PATCH v2] vhost: make SET_VRING_ADDR, SET_FEATURES send replies

2021-07-29 Thread Denis Plotnikov
On 23.07.2021 12:59, Denis Plotnikov wrote: ping! On 19.07.2021 17:21, Denis Plotnikov wrote: On vhost-user-blk migration, qemu normally sends a number of commands to enable logging if VHOST_USER_PROTOCOL_F_LOG_SHMFD is negotiated. Qemu sends VHOST_USER_SET_FEATURES to enable buffers logging

[PING][PATCH v2] vhost: make SET_VRING_ADDR, SET_FEATURES send replies

2021-07-23 Thread Denis Plotnikov
ping! On 19.07.2021 17:21, Denis Plotnikov wrote: On vhost-user-blk migration, qemu normally sends a number of commands to enable logging if VHOST_USER_PROTOCOL_F_LOG_SHMFD is negotiated. Qemu sends VHOST_USER_SET_FEATURES to enable buffers logging and VHOST_USER_SET_VRING_ADDR per each started

[PATCH v2] vhost: make SET_VRING_ADDR, SET_FEATURES send replies

2021-07-19 Thread Denis Plotnikov
estination. The same scenario is applicable for "used ring" data logging, which is turned on with VHOST_USER_SET_VRING_ADDR command. To resolve this issue, this patch makes qemu wait for the commands result explicilty if VHOST_USER_PROTOCOL_F_REPLY_ACK is negotiated and logging is enabled.

Re: [PATCH v1] vhost: make SET_VRING_ADDR, SET_FEATURES send replies

2021-07-14 Thread Denis Plotnikov
On 08.07.2021 16:02, Denis Plotnikov wrote: On 08.07.2021 15:04, Michael S. Tsirkin wrote: On Thu, Jul 08, 2021 at 11:28:40AM +0300, Denis Plotnikov wrote: On vhost-user-blk migration, qemu normally sends a number of commands to enable logging if VHOST_USER_PROTOCOL_F_LOG_SHMFD

Re: [PATCH v1] vhost: make SET_VRING_ADDR, SET_FEATURES send replies

2021-07-08 Thread Denis Plotnikov
On 08.07.2021 15:04, Michael S. Tsirkin wrote: On Thu, Jul 08, 2021 at 11:28:40AM +0300, Denis Plotnikov wrote: On vhost-user-blk migration, qemu normally sends a number of commands to enable logging if VHOST_USER_PROTOCOL_F_LOG_SHMFD is negotiated. Qemu sends VHOST_USER_SET_FEATURES

[PATCH v1] vhost: make SET_VRING_ADDR, SET_FEATURES send replies

2021-07-08 Thread Denis Plotnikov
estination. The same scenario is applicable for "used ring" data logging, which is turned on with VHOST_USER_SET_VRING_ADDR command. To resolve this issue, this patch makes qemu wait for the commands result explicilty if VHOST_USER_PROTOCOL_F_REPLY_ACK is negotiated. Signed-off-by: Deni

Re: [PATCH v0] vhost: make SET_VRING_ADDR, SET_[PROTOCOL_]FEATEURES send replies

2021-07-08 Thread Denis Plotnikov
On 07.07.2021 21:44, Michael S. Tsirkin wrote: On Wed, Jul 07, 2021 at 05:58:50PM +0300, Denis Plotnikov wrote: On 07.07.2021 17:39, Michael S. Tsirkin wrote: On Wed, Jul 07, 2021 at 03:19:20PM +0300, Denis Plotnikov wrote: On 07.07.2021 13:10, Michael S. Tsirkin wrote: On Fri, Jun 25

Re: [PATCH v0] vhost: make SET_VRING_ADDR, SET_[PROTOCOL_]FEATEURES send replies

2021-07-07 Thread Denis Plotnikov
On 07.07.2021 17:39, Michael S. Tsirkin wrote: On Wed, Jul 07, 2021 at 03:19:20PM +0300, Denis Plotnikov wrote: On 07.07.2021 13:10, Michael S. Tsirkin wrote: On Fri, Jun 25, 2021 at 11:52:10AM +0300, Denis Plotnikov wrote: On vhost-user-blk migration, qemu normally sends a number

Re: [PATCH v0] vhost: make SET_VRING_ADDR, SET_[PROTOCOL_]FEATEURES send replies

2021-07-07 Thread Denis Plotnikov
On 07.07.2021 13:10, Michael S. Tsirkin wrote: On Fri, Jun 25, 2021 at 11:52:10AM +0300, Denis Plotnikov wrote: On vhost-user-blk migration, qemu normally sends a number of commands to enable logging if VHOST_USER_PROTOCOL_F_LOG_SHMFD is negotiated. Qemu sends VHOST_USER_SET_FEATURES

[PING] [PATCH v0] vhost: make SET_VRING_ADDR, SET_[PROTOCOL_]FEATEURES send replies

2021-07-07 Thread Denis Plotnikov
On 02.07.2021 12:41, Denis Plotnikov wrote: ping ping! On 25.06.2021 11:52, Denis Plotnikov wrote: On vhost-user-blk migration, qemu normally sends a number of commands to enable logging if VHOST_USER_PROTOCOL_F_LOG_SHMFD is negotiated. Qemu sends VHOST_USER_SET_FEATURES to enable buffers

Re: [PATCH v0] vhost: make SET_VRING_ADDR, SET_[PROTOCOL_]FEATEURES send replies

2021-07-02 Thread Denis Plotnikov
ping ping! On 25.06.2021 11:52, Denis Plotnikov wrote: On vhost-user-blk migration, qemu normally sends a number of commands to enable logging if VHOST_USER_PROTOCOL_F_LOG_SHMFD is negotiated. Qemu sends VHOST_USER_SET_FEATURES to enable buffers logging and VHOST_USER_SET_FEATURES per each

[PATCH v0] vhost: make SET_VRING_ADDR, SET_[PROTOCOL_]FEATEURES send replies

2021-06-25 Thread Denis Plotnikov
explicilty if VHOST_USER_PROTOCOL_F_REPLY_ACK is negotiated. Also, this patch adds the reply waiting for VHOST_USER_SET_PROTOCOL_FEATURES command to make the features setting functions work similary. Signed-off-by: Denis Plotnikov --- hw/virtio/vhost-user.c | 20 1 file changed, 20 insertions(+) diff

Re: [PATCH 1/5] vhost-user-blk: Don't reconnect during initialisation

2021-04-23 Thread Denis Plotnikov
Reviewed-by: Denis Plotnikov On 22.04.2021 20:02, Kevin Wolf wrote: This is a partial revert of commits 77542d43149 and bc79c87bcde. Usually, an error during initialisation means that the configuration was wrong. Reconnecting won't make the error go away, but just turn the error condition

Re: [PATCH v3 2/3] vhost-user-blk: perform immediate cleanup if disconnect on initialization

2021-04-22 Thread Denis Plotnikov
On 21.04.2021 22:59, Michael S. Tsirkin wrote: On Wed, Apr 21, 2021 at 07:13:24PM +0300, Denis Plotnikov wrote: On 21.04.2021 18:24, Kevin Wolf wrote: Am 25.03.2021 um 16:12 hat Denis Plotnikov geschrieben: Commit 4bcad76f4c39 ("vhost-user-blk: delay vhost_user_blk_disconnect")

Re: [PATCH v3 2/3] vhost-user-blk: perform immediate cleanup if disconnect on initialization

2021-04-21 Thread Denis Plotnikov
On 21.04.2021 18:24, Kevin Wolf wrote: Am 25.03.2021 um 16:12 hat Denis Plotnikov geschrieben: Commit 4bcad76f4c39 ("vhost-user-blk: delay vhost_user_blk_disconnect") introduced postponing vhost_dev cleanup aiming to eliminate qemu aborts because of connection problems with vhost-

[BUG FIX][PATCH v3 0/3] vhost-user-blk: fix bug on device disconnection during initialization

2021-04-01 Thread Denis Plotnikov
This is a series fixing a bug in host-user-blk. Is there any chance for it to be considered for the next rc? Thanks! Denis On 29.03.2021 16:44, Denis Plotnikov wrote: ping! On 25.03.2021 18:12, Denis Plotnikov wrote: v3: * 0003: a new patch added fixing the problem on vm shutdown I

Re: [PATCH v3 0/3] vhost-user-blk: fix bug on device disconnection during initialization

2021-03-29 Thread Denis Plotnikov
ping! On 25.03.2021 18:12, Denis Plotnikov wrote: v3: * 0003: a new patch added fixing the problem on vm shutdown I stumbled on this bug after v2 sending. * 0001: gramma fixing (Raphael) * 0002: commit message fixing (Raphael) v2: * split the initial patch into two (Raphael

[PATCH v3 3/3] vhost-user-blk: add immediate cleanup on shutdown

2021-03-25 Thread Denis Plotnikov
destroyed. This calls vhost-user-blk event handler which in turn tries to manipulate with destroyed chardev by setting an empty event handler for vhost-user-blk cleanup postponing. This patch separates the shutdown case from the cleanup postponing removing the need to set an event handler. Signed-off

[PATCH v3 0/3] vhost-user-blk: fix bug on device disconnection during initialization

2021-03-25 Thread Denis Plotnikov
0003 (added in v3) fix bug on vm shutdown Denis Plotnikov (3): vhost-user-blk: use different event handlers on initialization vhost-user-blk: perform immediate cleanup if disconnect on initialization vhost-user-blk: add immediate cleanup on shutdown hw/block/vhost-user-blk.c | 79

[PATCH v3 1/3] vhost-user-blk: use different event handlers on initialization

2021-03-25 Thread Denis Plotnikov
the device, instead we explicitly use the proper event handler depending on whether the device has been initialized. Signed-off-by: Denis Plotnikov Reviewed-by: Raphael Norwitz --- hw/block/vhost-user-blk.c | 31 --- 1 file changed, 24 insertions(+), 7 deletions(-) diff

[PATCH v3 2/3] vhost-user-blk: perform immediate cleanup if disconnect on initialization

2021-03-25 Thread Denis Plotnikov
may happen when the device is in use, so the device users may want to use vhost_dev's data to do rollback before vhost_dev is re-initialized (e.g. in vhost_dev_set_log()). Signed-off-by: Denis Plotnikov Reviewed-by: Raphael Norwitz --- hw/block/vhost-user-blk.c | 48 +++

[PATCH v2 1/2] vhost-user-blk: use different event handlers on initialization

2021-03-24 Thread Denis Plotnikov
the device, instead we explicitly use the proper event handler dependping on whether the device has been initialized. Signed-off-by: Denis Plotnikov --- hw/block/vhost-user-blk.c | 31 --- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/hw/block/vhost-user

[PATCH v2 2/2] vhost-user-blk: perform immediate cleanup if disconnect on initialization

2021-03-24 Thread Denis Plotnikov
s re-initialized (e.g. in vhost_dev_set_log()), so we postpone the cleanup. The patch splits those two cases, and performs the cleanup immediately on initialization, and postpones cleanup when the device is initialized and in use. Signed-off-by: Denis Plotnikov --- hw/block/vhost

[PATCH v2 0/2] vhost-user-blk: fix bug on device disconnection during initialization

2021-03-24 Thread Denis Plotnikov
the bug. 0001 is preparation for the fix 0002 fixes the bug, patch description has the full motivation for the series Denis Plotnikov (2): vhost-user-blk: use different event handlers on initialization vhost-user-blk: perform immediate cleanup if disconnect on initialization hw/block/vhost

Re: [PATCH v1] vhost-user-blk: use different event handlers on init and operation

2021-03-22 Thread Denis Plotnikov
ping! On 11.03.2021 11:10, Denis Plotnikov wrote: Commit a1a20d06b73e "vhost-user-blk: delay vhost_user_blk_disconnect" introduced postponing vhost_dev cleanup aiming to eliminate qemu aborts because of connection problems with vhost-blk daemon. However, it introdues a new problem

[PATCH v1] configure: add option to implicitly enable/disable libgio

2021-03-12 Thread Denis Plotnikov
Now, compilation of util/dbus is implicit and depends on libgio presence on the building host. The patch adds options to manage libgio dependencies explicitly. Signed-off-by: Denis Plotnikov --- configure | 60 --- 1 file changed, 39

[PATCH v1] softmmu/vl: make default prealloc-threads work w/o -mem-prealloc

2021-03-11 Thread Denis Plotnikov
s at 1 instead. Fix it by setting the "prealloc-threads" sugar property of "memory-backend" to the number of vcpus unconditionally. Fixes: ffac16fab3 ("hostmem: introduce "prealloc-threads" property") Signed-off-by: Denis Plotnikov --- softmmu/vl.c | 17

[PATCH v1] vhost-user-blk: use different event handlers on init and operation

2021-03-11 Thread Denis Plotnikov
vhost_dev is re-initialized (e.g. in vhost_dev_set_log()), so we postpone the cleanup. The patch splits those two cases, and performs the cleanup immediately on initialization, and postpones cleanup when the device is initialized and in use. Signed-off-by: Denis Plotnikov --- hw/block/vhost

Re: [PATCH v0 3/4] migration: add background snapshot

2020-07-29 Thread Denis Plotnikov
On 29.07.2020 16:27, Dr. David Alan Gilbert wrote: ... /** * ram_find_and_save_block: finds a dirty page and sends it to f * @@ -1782,6 +2274,7 @@ static int ram_find_and_save_block(RAMState *rs, bool last_stage) pss.block = rs->last_seen_block; pss.page =

Re: [PATCH v0 3/4] migration: add background snapshot

2020-07-29 Thread Denis Plotnikov
On 24.07.2020 03:08, Peter Xu wrote: On Wed, Jul 22, 2020 at 11:11:32AM +0300, Denis Plotnikov wrote: +/** + * ram_copy_page: make a page copy + * + * Used in the background snapshot to make a copy of a memeory page. + * Ensures that the memeory page is copied only once. + * When a page copy

Re: [PATCH v0 3/4] migration: add background snapshot

2020-07-29 Thread Denis Plotnikov
On 24.07.2020 01:15, Peter Xu wrote: On Wed, Jul 22, 2020 at 11:11:32AM +0300, Denis Plotnikov wrote: +static void *background_snapshot_thread(void *opaque) +{ +MigrationState *m = opaque; +QIOChannelBuffer *bioc; +QEMUFile *fb; +int res = 0; + +rcu_register_thread

Re: [PATCH v0 3/4] migration: add background snapshot

2020-07-28 Thread Denis Plotnikov
On 27.07.2020 19:48, Dr. David Alan Gilbert wrote: * Denis Plotnikov (dplotni...@virtuozzo.com) wrote: ... +static void page_fault_thread_stop(void) +{ +if (page_fault_fd) { +close(page_fault_fd); +page_fault_fd = 0; +} I think you need to do that after you've done

Re: [PATCH v0 0/4] background snapshot

2020-07-24 Thread Denis Plotnikov
On 23.07.2020 20:39, Peter Xu wrote: On Thu, Jul 23, 2020 at 11:03:55AM +0300, Denis Plotnikov wrote: On 22.07.2020 19:30, Peter Xu wrote: On Wed, Jul 22, 2020 at 06:47:44PM +0300, Denis Plotnikov wrote: On 22.07.2020 18:42, Denis Plotnikov wrote: On 22.07.2020 17:50, Peter Xu wrote: Hi

Re: [PATCH v0 0/4] background snapshot

2020-07-23 Thread Denis Plotnikov
On 22.07.2020 19:30, Peter Xu wrote: On Wed, Jul 22, 2020 at 06:47:44PM +0300, Denis Plotnikov wrote: On 22.07.2020 18:42, Denis Plotnikov wrote: On 22.07.2020 17:50, Peter Xu wrote: Hi, Denis, Hi, Peter ... How to use: 1. enable background snapshot capability     virsh qemu-monitor

Re: [PATCH v0 0/4] background snapshot

2020-07-22 Thread Denis Plotnikov
On 22.07.2020 18:42, Denis Plotnikov wrote: On 22.07.2020 17:50, Peter Xu wrote: Hi, Denis, Hi, Peter ... How to use: 1. enable background snapshot capability     virsh qemu-monitor-command vm --hmp migrate_set_capability background-snapshot on 2. stop the vm     virsh qemu-monitor

Re: [PATCH v0 0/4] background snapshot

2020-07-22 Thread Denis Plotnikov
On 22.07.2020 17:50, Peter Xu wrote: Hi, Denis, Hi, Peter ... How to use: 1. enable background snapshot capability virsh qemu-monitor-command vm --hmp migrate_set_capability background-snapshot on 2. stop the vm virsh qemu-monitor-command vm --hmp stop 3. Start the external

[PATCH v0 3/4] migration: add background snapshot

2020-07-22 Thread Denis Plotnikov
capability is used. With the capability enabled, the vm is paused for a small amount of time while the smallest vmstate part (all, except RAM) is writen. RAM, the biggest part of vmstate, is written with running VM. Signed-off-by: Denis Plotnikov --- include/exec/ramblock.h | 8 + include/exec

[PATCH v0 2/4] migration: add background snapshot capability

2020-07-22 Thread Denis Plotnikov
The capability is used for background snapshot enabling. The background snapshot logic is going to be added in the following patch. Signed-off-by: Denis Plotnikov --- qapi/migration.json | 7 ++- migration/migration.h | 1 + migration/migration.c | 35

[PATCH v0 1/4] bitops: add some atomic versions of bitmap operations

2020-07-22 Thread Denis Plotnikov
1. test bit 2. test and set bit Signed-off-by: Denis Plotnikov Reviewed-by: Peter Xu --- include/qemu/bitops.h | 25 + 1 file changed, 25 insertions(+) diff --git a/include/qemu/bitops.h b/include/qemu/bitops.h index f55ce8b320..63218afa5a 100644 --- a/include/qemu

[PATCH v0 4/4] background snapshot: add trace events for page fault processing

2020-07-22 Thread Denis Plotnikov
Signed-off-by: Denis Plotnikov --- migration/ram.c| 4 migration/trace-events | 2 ++ 2 files changed, 6 insertions(+) diff --git a/migration/ram.c b/migration/ram.c index f187b5b494..29712a11c2 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -2172,12 +2172,16 @@ again

[PATCH v0 0/4] background snapshot

2020-07-22 Thread Denis Plotnikov
--hmp stop 3. Start the external migration to a file virsh qemu-monitor-command cent78-bs --hmp migrate exec:'cat > ./vm_state' 4. Wait for the migration finish and check that the migration has completed state. Denis Plotnikov (4): bitops: add some atomic versions of bitmap operati

Re: [RFC PATCH 0/3] block: Synchronous bdrv_*() from coroutine in different AioContext

2020-05-20 Thread Denis Plotnikov
I'm not quite sure I understand the point. Let's see all the picture of async snapshot: our goal is to minimize a VM downtime during the snapshot. When we do async snapshot we save vmstate except RAM when a VM is stopped using the current L1 table (further initial L1 table). Then, we want the

Re: [RFC PATCH 0/3] block: Synchronous bdrv_*() from coroutine in different AioContext

2020-05-19 Thread Denis Plotnikov
On 19.05.2020 17:18, Kevin Wolf wrote: Am 19.05.2020 um 15:54 hat Denis Plotnikov geschrieben: On 19.05.2020 15:32, Vladimir Sementsov-Ogievskiy wrote: 14.05.2020 17:26, Kevin Wolf wrote: Am 14.05.2020 um 15:21 hat Thomas Lamprecht geschrieben: On 5/12/20 4:43 PM, Kevin Wolf wrote

Re: [RFC PATCH 0/3] block: Synchronous bdrv_*() from coroutine in different AioContext

2020-05-19 Thread Denis Plotnikov
on that. What I've done can be found here: https://github.com/denis-plotnikov/qemu/commits/bgs_uffd The idea was to save a snapshot (state+ram) asynchronously to a separate (raw) file using the existing infrastructure. The goal of that was to reduce the VM downtime on snapshot. We decided

[PATCH v24 3/4] qcow2: add zstd cluster compression

2020-05-07 Thread Denis Plotnikov
size in both cases: 1.4G Signed-off-by: Denis Plotnikov QAPI part: Acked-by: Markus Armbruster --- docs/interop/qcow2.txt | 1 + configure | 2 +- qapi/block-core.json | 3 +- block/qcow2-threads.c | 169 + block/qcow2.c | 7

[PATCH v24 1/4] qcow2: introduce compression type feature

2020-05-07 Thread Denis Plotnikov
255, 274, 280 Signed-off-by: Denis Plotnikov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Reviewed-by: Max Reitz QAPI part: Acked-by: Markus Armbruster --- qapi/block-core.json | 22 +- block/qcow2.h| 20 +- include/bloc

[PATCH v24 0/4] implement zstd cluster compression method

2020-05-07 Thread Denis Plotnikov
rudundant checks [Eric] * fix compressed cluster layout in qcow2 spec [Vladimir] * fix wording [Eric, Vladimir] * fix compression type filtering in iotests [Eric] v1: the initial series Denis Plotnikov (4): qcow2: introduce compression type feature qcow2: rework the cluster compr

[PATCH v24 2/4] qcow2: rework the cluster compression routine

2020-05-07 Thread Denis Plotnikov
The patch enables processing the image compression type defined for the image and chooses an appropriate method for image clusters (de)compression. Signed-off-by: Denis Plotnikov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz --- block/qcow2

[PATCH v24 4/4] iotests: 287: add qcow2 compression type test

2020-05-07 Thread Denis Plotnikov
The test checks fulfilling qcow2 requirements for the compression type feature and zstd compression type operability. Signed-off-by: Denis Plotnikov Reviewed-by: Vladimir Sementsov-Ogievskiy Tested-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- tests/qemu-iotests/287 | 152

Re: [PATCH v23 0/4] implement zstd cluster compression method

2020-05-06 Thread Denis Plotnikov
On 05.05.2020 15:03, Max Reitz wrote: On 05.05.20 12:26, Max Reitz wrote: On 30.04.20 12:19, Denis Plotnikov wrote: v23: Undecided: whether to add zstd(zlib) compression details to the qcow2 spec 03: tighten assertion on zstd decompression [Eric] 04: use

Re: [PATCH v22 3/4] qcow2: add zstd cluster compression

2020-04-30 Thread Denis Plotnikov
On 30.04.2020 14:47, Max Reitz wrote: On 30.04.20 11:48, Denis Plotnikov wrote: On 30.04.2020 11:26, Max Reitz wrote: On 29.04.20 15:02, Vladimir Sementsov-Ogievskiy wrote: 29.04.2020 15:17, Max Reitz wrote: On 29.04.20 12:37, Vladimir Sementsov-Ogievskiy wrote: 29.04.2020 13:24, Max

[PATCH v23 1/4] qcow2: introduce compression type feature

2020-04-30 Thread Denis Plotnikov
feature compression type backing_file_offset += 56 (8 + 48 -> header_change + feature_table_change) * add "compression type" for test output matching when it isn't filtered affected tests: 049, 060, 061, 065, 144, 182, 242, 255 Signed-off-by: Denis Plotnikov Reviewed

[PATCH v23 2/4] qcow2: rework the cluster compression routine

2020-04-30 Thread Denis Plotnikov
The patch enables processing the image compression type defined for the image and chooses an appropriate method for image clusters (de)compression. Signed-off-by: Denis Plotnikov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz --- block/qcow2

[PATCH v23 0/4] implement zstd cluster compression method

2020-04-30 Thread Denis Plotnikov
Vladimir] * fix compression type filtering in iotests [Eric] v1: the initial series Denis Plotnikov (4): qcow2: introduce compression type feature qcow2: rework the cluster compression routine qcow2: add zstd cluster compression iotests: 287: add qcow2 compression type test docs/

[PATCH v23 3/4] qcow2: add zstd cluster compression

2020-04-30 Thread Denis Plotnikov
size in both cases: 1.4G Signed-off-by: Denis Plotnikov QAPI part: Acked-by: Markus Armbruster --- docs/interop/qcow2.txt | 1 + configure | 2 +- qapi/block-core.json | 3 +- block/qcow2-threads.c | 169 + block/qcow2.c | 7

[PATCH v23 4/4] iotests: 287: add qcow2 compression type test

2020-04-30 Thread Denis Plotnikov
The test checks fulfilling qcow2 requirements for the compression type feature and zstd compression type operability. Signed-off-by: Denis Plotnikov Reviewed-by: Vladimir Sementsov-Ogievskiy Tested-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- tests/qemu-iotests/287 | 152

Re: [PATCH v22 3/4] qcow2: add zstd cluster compression

2020-04-30 Thread Denis Plotnikov
On 30.04.2020 11:26, Max Reitz wrote: On 29.04.20 15:02, Vladimir Sementsov-Ogievskiy wrote: 29.04.2020 15:17, Max Reitz wrote: On 29.04.20 12:37, Vladimir Sementsov-Ogievskiy wrote: 29.04.2020 13:24, Max Reitz wrote: On 28.04.20 22:00, Denis Plotnikov wrote: zstd significantly reduces

Re: [PATCH v22 4/4] iotests: 287: add qcow2 compression type test

2020-04-29 Thread Denis Plotnikov
On 29.04.2020 13:26, Max Reitz wrote: On 28.04.20 22:00, Denis Plotnikov wrote: The test checks fulfilling qcow2 requirements for the compression type feature and zstd compression type operability. Signed-off-by: Denis Plotnikov Reviewed-by: Vladimir Sementsov-Ogievskiy Tested

Re: [PATCH v22 3/4] qcow2: add zstd cluster compression

2020-04-29 Thread Denis Plotnikov
On 29.04.2020 13:24, Max Reitz wrote: On 28.04.20 22:00, Denis Plotnikov wrote: zstd significantly reduces cluster compression time. It provides better compression performance maintaining the same level of the compression ratio in comparison with zlib, which, at the moment, is the only

Re: [RFC patch v1 2/3] qemu-file: add buffered mode

2020-04-28 Thread Denis Plotnikov
On 28.04.2020 20:54, Dr. David Alan Gilbert wrote: * Denis Plotnikov (dplotni...@virtuozzo.com) wrote: On 27.04.2020 15:14, Dr. David Alan Gilbert wrote: * Denis Plotnikov (dplotni...@virtuozzo.com) wrote: The patch adds ability to qemu-file to write the data asynchronously to improve

[PATCH v22 4/4] iotests: 287: add qcow2 compression type test

2020-04-28 Thread Denis Plotnikov
The test checks fulfilling qcow2 requirements for the compression type feature and zstd compression type operability. Signed-off-by: Denis Plotnikov Reviewed-by: Vladimir Sementsov-Ogievskiy Tested-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/287 | 152

[PATCH v22 0/4] implement zstd cluster compression method

2020-04-28 Thread Denis Plotnikov
dundant checks [Eric] * fix compressed cluster layout in qcow2 spec [Vladimir] * fix wording [Eric, Vladimir] * fix compression type filtering in iotests [Eric] v1: the initial series Denis Plotnikov (4): qcow2: introduce compression type feature qcow2: rework the cluster compression rou

[PATCH v22 1/4] qcow2: introduce compression type feature

2020-04-28 Thread Denis Plotnikov
feature compression type backing_file_offset += 56 (8 + 48 -> header_change + feature_table_change) * add "compression type" for test output matching when it isn't filtered affected tests: 049, 060, 061, 065, 144, 182, 242, 255 Signed-off-by: Denis Plotnikov Reviewed

[PATCH v22 2/4] qcow2: rework the cluster compression routine

2020-04-28 Thread Denis Plotnikov
The patch enables processing the image compression type defined for the image and chooses an appropriate method for image clusters (de)compression. Signed-off-by: Denis Plotnikov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia --- block/qcow2-threads.c | 71

[PATCH v22 3/4] qcow2: add zstd cluster compression

2020-04-28 Thread Denis Plotnikov
size in both cases: 1.4G Signed-off-by: Denis Plotnikov QAPI part: Acked-by: Markus Armbruster --- docs/interop/qcow2.txt | 1 + configure | 2 +- qapi/block-core.json | 3 +- block/qcow2-threads.c | 169 + block/qcow2.c | 7

Re: [PATCH v20 4/4] iotests: 287: add qcow2 compression type test

2020-04-28 Thread Denis Plotnikov
On 28.04.2020 16:01, Eric Blake wrote: On 4/28/20 7:55 AM, Max Reitz wrote: +# This tests qocw2-specific low-level functionality +_supported_fmt qcow2 +_supported_proto file +_supported_os Linux This test doesn’t work with compat=0.10 (because we can’t store a non-default compression type

  1   2   3   4   5   6   >