Re: [PATCH] misc: introduce strim-memory qapi to support free memory trimming

2024-07-26 Thread Guoyi Tu
On 2024/7/25 20:50, Dr. David Alan Gilbert wrote: * Daniel P. Berrang� (berra...@redhat.com) wrote: On Thu, Jul 25, 2024 at 01:35:21PM +0200, Markus Armbruster wrote: Guoyi Tu writes: In the test environment, we conducted IO stress tests on all storage disks within a virtual machine that

Re: [PATCH] misc: introduce strim-memory qapi to support free memory trimming

2024-07-26 Thread Guoyi Tu
On 2024/7/25 19:57, Daniel P. Berrangé wrote: On Thu, Jul 25, 2024 at 01:35:21PM +0200, Markus Armbruster wrote: Guoyi Tu writes: In the test environment, we conducted IO stress tests on all storage disks within a virtual machine that had five storage devices mounted.During testing, we found

Re: [PATCH] misc: introduce strim-memory qapi to support free memory trimming

2024-07-26 Thread Guoyi Tu
On 2024/7/25 19:35, Markus Armbruster wrote: Guoyi Tu writes: In the test environment, we conducted IO stress tests on all storage disks within a virtual machine that had five storage devices mounted.During testing, we found that the qemu process allocated a large amount of memory (~800MB) to

Re: [PATCH] misc: introduce strim-memory qapi to support free memory trimming

2024-07-06 Thread Guoyi Tu
Hi there, please review this patch,any comments are welcome. On 2024/6/28 18:22, Guoyi Tu wrote: In the test environment, we conducted IO stress tests on all storage disks within a virtual machine that had five storage devices mounted.During testing, we found that the qemu process allocated

[PATCH] misc: introduce strim-memory qapi to support free memory trimming

2024-06-28 Thread Guoyi Tu
free memory. With this api, the management tool can monitor the virtual machine's state and call this API during idle times to free up the memory occupied by the virtual machine, thereby allowing more virtual machines to be provisioned. Signed-off-by: Guoyi Tu Signed-off-by: dengpeng

[PATCH] docs: Fix title format errors in the multi-process.rst

2024-06-19 Thread Guoyi Tu
Signed-off-by: Guoyi Tu --- docs/devel/multi-process.rst | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/devel/multi-process.rst b/docs/devel/multi-process.rst index 4ef539c0b0..223f878139 100644 --- a/docs/devel/multi-process.rst +++ b/docs/devel/multi

Re: [PATCH] migrate/ram: let ram_save_target_page_legacy() return if qemu file got error

2023-09-04 Thread Guoyi Tu
Hi Juan, what do you think of this patch? Can it be merged into the upstream? On 2023/8/15 15:21, Guoyi Tu wrote: When the migration process of a virtual machine using huge pages is cancelled, QEMU will continue to complete the processing of the current huge page through the qemu file object

Re: [PATCH v1 0/2] ui/vdagent: Fix two bugs about disconnect event handling

2023-09-04 Thread Guoyi Tu
On 2023/9/4 19:28, Marc-André Lureau wrote: Hi On Mon, Sep 4, 2023 at 3:26 PM Guoyi Tu wrote: Hi Gerd, what do you think of these two patches? Can they be merged into the upstream? I'll queue them. thanks I'm glad they can be merged. Thank you.

Re: [PATCH v1 0/2] ui/vdagent: Fix two bugs about disconnect event handling

2023-09-04 Thread Guoyi Tu
Hi Gerd, what do you think of these two patches? Can they be merged into the upstream? On 2023/8/17 22:12, t...@chinatelecom.cn wrote: From: Guoyi Tu and resource leak Guoyi Tu (2): ui/vdagent: call vdagent_disconnect() when agent connection is lost ui/vdagent: Unregister input handler

Re: [PATCH] migrate/ram: let ram_save_target_page_legacy() return if qemu file got error

2023-08-17 Thread Guoyi Tu
I apologize for the previous email being cut off. I am resending it here. It sounds very reasonable. the return value of the QEMUFile interface cannot accurately reflect the actual situation, and the way these interfaces are being called during the migration process also is a little bit weird. I

Re: [PATCH] migrate/ram: let ram_save_target_page_legacy() return if qemu file got error

2023-08-17 Thread Guoyi Tu
Thank you for the reminder. There might be some issues with the company's email service. I also noticed this morning that I missed receiving an email in response from Fabiano. On 2023/8/17 21:35, 【外部账号】 Peter Xu wrote: On Thu, Aug 17, 2023 at 10:19:19AM +0800, Guoyi Tu wrote: On 2023

Re: [PATCH 1/2] ui/vdagent: call vdagent_disconnect() when agent connection is lost

2023-08-17 Thread Guoyi Tu
On 2023/8/17 21:36, 【外部账号】Marc-André Lureau wrote: Hi On Thu, Aug 17, 2023 at 5:10 PM Guoyi Tu wrote: On 2023/8/17 20:49, 【外部账号】Marc-André Lureau wrote: Hi On Thu, Aug 17, 2023 at 3:32 PM wrote: From: Guoyi Tu when the agent connection is lost, the input handler of the mouse

Re: [PATCH 1/2] ui/vdagent: call vdagent_disconnect() when agent connection is lost

2023-08-17 Thread Guoyi Tu
On 2023/8/17 20:49, 【外部账号】Marc-André Lureau wrote: Hi On Thu, Aug 17, 2023 at 3:32 PM wrote: From: Guoyi Tu when the agent connection is lost, the input handler of the mouse doesn't deactivate, which results in unresponsive mouse events in VNC windows. To fix this issue,

Re: [PATCH] migrate/ram: let ram_save_target_page_legacy() return if qemu file got error

2023-08-16 Thread Guoyi Tu
On 2023/8/16 23:15, 【外部账号】 Fabiano Rosas wrote: Peter Xu writes: On Tue, Aug 15, 2023 at 07:42:24PM -0300, Fabiano Rosas wrote: Yep, I see that. I meant explicitly move the code into the loop. Feels a bit weird to check the QEMUFile for errors first thing inside the function when nothing a

Re: [PATCH] migrate/ram: let ram_save_target_page_legacy() return if qemu file got error

2023-08-15 Thread Guoyi Tu
On 2023/8/16 6:19, 【外部账号】 Peter Xu wrote: On Tue, Aug 15, 2023 at 09:35:19AM -0300, Fabiano Rosas wrote: Guoyi Tu writes: When the migration process of a virtual machine using huge pages is cancelled, QEMU will continue to complete the processing of the current huge page through the qemu

Re: [PATCH] migrate/ram: let ram_save_target_page_legacy() return if qemu file got error

2023-08-15 Thread Guoyi Tu
On 2023/8/15 20:35, 【外部账号】 Fabiano Rosas wrote: Guoyi Tu writes: When the migration process of a virtual machine using huge pages is cancelled, QEMU will continue to complete the processing of the current huge page through the qemu file object got an error set. These processing, such as

[PATCH] migrate/ram: let ram_save_target_page_legacy() return if qemu file got error

2023-08-15 Thread Guoyi Tu
e the function returns immediately if qemu file got an error. Signed-off-by: Guoyi Tu --- migration/ram.c | 4 1 file changed, 4 insertions(+) diff --git a/migration/ram.c b/migration/ram.c index 9040d66e61..3e2ebf3004 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -2133,6 +2133,10 @@ stati

pci: Fix the update of interrupt disable bit in PCI_COMMAND register

2023-08-11 Thread Guoyi Tu
inability to handle the interrupt disable update event. To fix this issue, we can use the ranges_overlap function instead of range_covers_byte to determine whether the interrupt bit has been updated. Signed-off-by: Guoyi Tu Signed-off-by: yuanminghao --- hw/pci/pci.c | 2 +- 1 file changed, 1

Call qemu_socketpair() instead of socketpair() when possible

2023-01-15 Thread Guoyi Tu
As qemu_socketpair() was introduced in commit 3c63b4e9 ("oslib-posix: Introduce qemu_socketpair()"), it's time to replace the other existing socketpair() calls with qemu_socketpair() if possible Signed-off-by: Guoyi Tu --- backends/tpm/tpm_emulator.c | 2 +- tests/qte

Re: [PATCH v1 0/2] introduce qemu_socketpiar()

2022-09-19 Thread Guoyi Tu
Hi Peter, what do you think about this patches? If this could be merged in upstream, i will start to update the test codes On 8/23/22 15:50, t...@chinatelecom.cn wrote: From: Guoyi Tu Introduce qemu_socketpair() to create socket pair fd, and set the close-on-exec flag at default as with

Re: [PATCH v1 0/2] introduce qemu_socketpiar()

2022-09-05 Thread Guoyi Tu
On 9/5/22 20:33, Marc-André Lureau wrote: Hi On Mon, Sep 5, 2022 at 4:28 PM Guoyi Tu <mailto:t...@chinatelecom.cn>> wrote: On 9/5/22 19:19, Marc-André Lureau wrote: > Hi > > On Tue, Aug 23, 2022 at 12:00 PM mailto:t...@chinatelecom.cn

Re: [PATCH v1 0/2] introduce qemu_socketpiar()

2022-09-05 Thread Guoyi Tu
On 9/5/22 19:19, Marc-André Lureau wrote: Hi On Tue, Aug 23, 2022 at 12:00 PM <mailto:t...@chinatelecom.cn>> wrote: From: Guoyi Tu mailto:t...@chinatelecom.cn>> Introduce qemu_socketpair() to create socket pair fd, and set the close-on-exec flag at default as

Re: [PATCH v1 0/2] introduce qemu_socketpiar()

2022-09-05 Thread Guoyi Tu
Ping... Any advises are welcome On 8/23/22 15:50, t...@chinatelecom.cn wrote: From: Guoyi Tu Introduce qemu_socketpair() to create socket pair fd, and set the close-on-exec flag at default as with the other type of socket does. besides, the live update feature is developing, so it&#

Re: [PATCH] osdep: Introduce qemu_get_fd() to wrap the common codes

2022-08-31 Thread Guoyi Tu
On 8/30/22 14:03, Markus Armbruster wrote: Christian Schoenebeck writes: On Donnerstag, 18. August 2022 14:06:04 CEST Guoyi Tu wrote: Ping... Any comments are welcome On 8/12/22 19:01, Guoyi Tu wrote: socket_get_fd() have much the same codes as monitor_fd_param(), so qemu_get_fd() is

Re: [PATCH] osdep: Introduce qemu_get_fd() to wrap the common codes

2022-08-31 Thread Guoyi Tu
On 8/18/22 20:58, Christian Schoenebeck wrote: On Donnerstag, 18. August 2022 14:06:04 CEST Guoyi Tu wrote: Ping... Any comments are welcome On 8/12/22 19:01, Guoyi Tu wrote: socket_get_fd() have much the same codes as monitor_fd_param(), so qemu_get_fd() is introduced to implement the

Re: [PATCH] osdep: Introduce qemu_get_fd() to wrap the common codes

2022-08-18 Thread Guoyi Tu
Ping... Any comments are welcome On 8/12/22 19:01, Guoyi Tu wrote: socket_get_fd() have much the same codes as monitor_fd_param(), so qemu_get_fd() is introduced to implement the common logic. now socket_get_fd() and monitor_fd_param() directly call this function. Signed-off-by: Guoyi Tu

Re: [PATCH 1/2] osdeps: Introduce qemu_socketpair()

2022-08-18 Thread Guoyi Tu
On 8/12/22 19:49, Peter Maydell wrote: On Fri, 12 Aug 2022 at 12:44, wrote: From: Guoyi Tu qemu_socketpair() will create a pair of connected sockets with FD_CLOEXEC set Signed-off-by: Guoyi Tu --- include/qemu/sockets.h | 3 +++ util/osdep.c | 24

Re: [PATCH 2/2] vhost-user: Call qemu_socketpair() instead of socketpair()

2022-08-18 Thread Guoyi Tu
On 8/12/22 19:50, Peter Maydell wrote: On Fri, 12 Aug 2022 at 12:44, wrote: From: Guoyi Tu set close-on-exec flag on the new opened file descriptors at default What goes wrong if we don't do this? The commit message is a good place to explain what bug the commit is fixing, an

[PATCH] osdep: Introduce qemu_get_fd() to wrap the common codes

2022-08-12 Thread Guoyi Tu
socket_get_fd() have much the same codes as monitor_fd_param(), so qemu_get_fd() is introduced to implement the common logic. now socket_get_fd() and monitor_fd_param() directly call this function. Signed-off-by: Guoyi Tu ---  include/qemu/osdep.h |  1 +  monitor/misc.c   | 21

Re: [PATCH V8 02/39] migration: qemu file wrappers

2022-06-15 Thread Guoyi Tu
On 2022/6/15 22:51, Steve Sistare wrote: Add qemu_file_open and qemu_fd_open to create QEMUFile objects for unix files and file descriptors. the function names should be updated. -- Guoyi Signed-off-by: Steve Sistare --- migration/qemu-file-channel.c | 36 ++

Re: [PATCH V7 29/29] cpr: only-cpr-capable option

2022-02-18 Thread Guoyi Tu
c b/stubs/cpr.c > new file mode 100644 > index 000..aaa189e > --- /dev/null > +++ b/stubs/cpr.c > @@ -0,0 +1,3 @@ > +#include "qemu/osdep.h" > + > +bool only_cpr_capable; > diff --git a/stubs/meson.build b/stubs/meson.build > index 9565c7d..4c9c4ea 100644 > --- a/stubs/meson.build > +++ b/stubs/meson.build > @@ -4,6 +4,7 @@ stub_ss.add(files('blk-exp-close-all.c')) > stub_ss.add(files('blockdev-close-all-bdrv-states.c')) > stub_ss.add(files('change-state-handler.c')) > stub_ss.add(files('cmos.c')) > +stub_ss.add(files('cpr.c')) > stub_ss.add(files('cpr-state.c')) > stub_ss.add(files('cpu-get-clock.c')) > stub_ss.add(files('cpus-get-virtual-clock.c')) The only-cpr-capable option is a good way to prevent qemu from starting if some device don't support cpr. But if this option is not provided, the user still can perform cpr-xxx operation even there are devices don't support cpr, in this case, the exec() will fail and the original process cannot recovery. How about introducing a cpr blocker (as migration blocker does) to prevent the user from performing cpr-xxx operaton to address the problem -- Guoyi Tu

Re: [PATCH V7 28/29] chardev: cpr for sockets

2022-02-18 Thread Guoyi Tu
On Wed, 2021-12-22 at 11:05 -0800, Steve Sistare wrote: > Save accepted socket fds before cpr-save, and look for them after > cpr-load. > in the environment after cpr-load. Reject cpr-exec if a socket > enables > the TLS or websocket option. Allow a monitor socket by closing it on > exec. > > Si

Re: [PATCH V7 10/29] machine: memfd-alloc option

2022-02-18 Thread Guoyi Tu
;max_length, > - &new_block->mr- > >align, > - shared, > noreserve); > -if (!new_block->host) { > +name = memory_region_name(mr); >

[PATCH] qapi: Set boolean value correctly in examples

2021-08-27 Thread Guoyi Tu
Signed-off-by: Guoyi Tu --- qapi/trace.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/trace.json b/qapi/trace.json index 47c68f04da..eedfded512 100644 --- a/qapi/trace.json +++ b/qapi/trace.json @@ -99,7 +99,7 @@ # Example: # # -> { "execute":