Re: qemu-x86_64 runs out of memory

2022-09-26 Thread Li Zhang
I did some investigation and when I mmap 2TB memory, the PageDesc is allocated with 12GB. The count of PageDesc is about 0x8 and the size of PageDesc is 24Bytes. So memory costs about 12GB. If the size of PageDesc data is reduced, the memory should be reduced significantly. If more and more

Re: [PATCH v3 1/1] Fix the coredump when memory backend id conflicts with default_ram_id

2022-06-20 Thread Li Zhang
On Mon, Jun 13, 2022 at 5:31 PM David Hildenbrand wrote: > > On 13.06.22 16:37, Li Zhang wrote: > > On Mon, Jun 13, 2022 at 4:19 PM Igor Mammedov wrote: > >> > >> On Mon, 13 Jun 2022 12:44:02 +0200 > >> Li Zhang wrote: > >> > >>

Re: [PATCH v3 1/1] Fix the coredump when memory backend id conflicts with default_ram_id

2022-06-13 Thread Li Zhang
On Mon, Jun 13, 2022 at 4:19 PM Igor Mammedov wrote: > > On Mon, 13 Jun 2022 12:44:02 +0200 > Li Zhang wrote: > > > When no memory backend is specified in machine options, > > a default memory device will be added with default_ram_id. > > However, if a memory b

[PATCH v3 1/1] Fix the coredump when memory backend id conflicts with default_ram_id

2022-06-13 Thread Li Zhang
0x7fb109a7e34d __libc_start_main (libc.so.6 + 0x2534d) #14 0x558c344e53ba _start (qemu-system-x86_64 + 0x2e53ba) Signed-off-by: Li Zhang --- hw/core/machine.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/core/machine.c b/hw/core/machine.c index a673302cce

Re: [PATCH v2 1/1] Fix the coredump when memory backend id conflicts with default_ram_id

2022-06-13 Thread Li Zhang
On Thu, Jun 9, 2022 at 5:59 PM Igor Mammedov wrote: > > On Fri, 20 May 2022 11:56:02 +0200 > Li Zhang wrote: > > > When no memory backend is specified in machine options, > > a default memory device will be added with default_ram_id. > > However, if a memory b

Re: [PATCH v2 1/1] Fix the coredump when memory backend id conflicts with default_ram_id

2022-06-07 Thread Li Zhang
Thanks Philippe. Hi Igor, Any comments about this patch? On Wed, Jun 1, 2022 at 2:28 PM Philippe Mathieu-Daudé via wrote: > > Cc'ing Igor > > On Fri, May 20, 2022 at 11:56 AM Li Zhang wrote: > > > > When no memory backend is specified in machine options, >

[PATCH v2 1/1] Fix the coredump when memory backend id conflicts with default_ram_id

2022-05-20 Thread Li Zhang
0x7fb109a7e34d __libc_start_main (libc.so.6 + 0x2534d) #14 0x558c344e53ba _start (qemu-system-x86_64 + 0x2e53ba) Signed-off-by: Li Zhang --- hw/core/machine.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/core/machine.c b/hw/core/machine.c index b03d9192ba..3867af7a8a

[PATCH 1/1] Fix the coredump when memory backend id conflicts with default_ram_id

2022-05-20 Thread Li Zhang
0x7fb109a7e34d __libc_start_main (libc.so.6 + 0x2534d) #14 0x558c344e53ba _start (qemu-system-x86_64 + 0x2e53ba) Signed-off-by: Li Zhang --- hw/core/machine.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/core/machine.c b/hw/core/machine.c index b03d9192ba..155c78e9fc

Re: iotest40 problem

2022-04-06 Thread Li Zhang
On 3/31/22 16:46, John Snow wrote: On Thu, Mar 31, 2022, 10:37 AM John Snow <mailto:js...@redhat.com>> wrote: On Thu, Mar 31, 2022, 6:47 AM Li Zhang mailto:lizh...@suse.de>> wrote: On 3/31/22 08:10, Hanna Reitz wrote: > On 29.03.22 18:

Re: iotest40 problem

2022-03-31 Thread Li Zhang
On 3/31/22 16:37, John Snow wrote: On Thu, Mar 31, 2022, 6:47 AM Li Zhang <mailto:lizh...@suse.de>> wrote: On 3/31/22 08:10, Hanna Reitz wrote: > On 29.03.22 18:49, Li Zhang wrote: >> Update what I observed. >> >> It seems that aqmp i

Re: iotest40 problem

2022-03-31 Thread Li Zhang
On 3/31/22 16:46, John Snow wrote: On Thu, Mar 31, 2022, 10:37 AM John Snow <mailto:js...@redhat.com>> wrote: On Thu, Mar 31, 2022, 6:47 AM Li Zhang mailto:lizh...@suse.de>> wrote: On 3/31/22 08:10, Hanna Reitz wrote: > On 29.03.22 18:

Re: iotest40 problem

2022-03-31 Thread Li Zhang
On 3/31/22 08:10, Hanna Reitz wrote: On 29.03.22 18:49, Li Zhang wrote: Update what I observed. It seems that aqmp is not stable when running test cases. So I revert the patches as the following, iotest40/41 test cases work well. Thanks for bisecting.  I haven’t seen this problem before, so

Re: qemu iotest 161 and make check

2022-03-31 Thread Li Zhang
On 3/31/22 09:44, Christian Borntraeger wrote: Am 21.02.22 um 11:27 schrieb Christian Borntraeger: Am 10.02.22 um 18:44 schrieb Vladimir Sementsov-Ogievskiy: 10.02.2022 20:13, Thomas Huth wrote: On 10/02/2022 15.51, Christian Borntraeger wrote: Am 10.02.22 um 15:47 schrieb Vladimir

Re: iotest40 problem

2022-03-29 Thread Li Zhang
become a no-op. Signed-off-by: John Snow Reviewed-by: Willian Rampazzo Message-id: 2028204620.1897674-6-js...@redhat.com Signed-off-by: John Snow On 3/25/22 11:17, Li Zhang wrote: Hi, I backport some iotests patches to the tree and change timeout. It doesn't

Re: iotest40 problem

2022-03-25 Thread Li Zhang
ock V=1 I can see the errors on ppc, arm or x86. But I couldn't reproduce it when I run it manually. It will be appreciated if any suggestions. Thanks. On 3/24/22 14:47, Li Zhang wrote: Hi, When I run the testsuit on our buidling system, it reports a timeout sometimes not always as the following. It couldn'

iotest40 problem

2022-03-24 Thread Li Zhang
Hi, When I run the testsuit on our buidling system, it reports a timeout sometimes not always as the following. It couldn't connect qmp socket. Any ideas about this problem? [ 1989s] --- /home/abuild/rpmbuild/BUILD/qemu-6.2.0/tests/qemu-iotests/040.out [ 1989s] +++ 040.out.bad [ 1989s] @@

[RESEND PATCH v3 1/1] multifd: Remove some redundant code

2022-02-24 Thread Li Zhang
Clean up some unnecessary code Signed-off-by: Li Zhang --- migration/multifd.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 3242f688e5..d44cc6670f 100644 --- a/migration/multifd.c +++ b/migration/multifd.c

[PATCH v2 1/1] numa: check NUMA nodes with memdev specified

2022-02-18 Thread Li Zhang
without memdev specified is always 0. So it's better to remind users to check the memory of the NUMA nodes with memdev specified. Signed-off-by: Li Zhang --- hw/core/numa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/core/numa.c b/hw/core/numa.c index 1aa05dcf42

Re: [PATCH 1/1] numa: check mem or memdev in numa configuration

2022-02-17 Thread Li Zhang
On 2/17/22 2:33 PM, Igor Mammedov wrote: On Thu, 17 Feb 2022 13:24:08 +0100 Li Zhang wrote: On 2/17/22 11:25 AM, Igor Mammedov wrote: On Thu, 17 Feb 2022 10:38:32 +0100 Li Zhang wrote: On 2/17/22 10:10 AM, Igor Mammedov wrote: On Wed, 16 Feb 2022 17:36:13 +0100 Li Zhang wrote

Re: [PATCH 1/1] numa: check mem or memdev in numa configuration

2022-02-17 Thread Li Zhang
On 2/17/22 11:25 AM, Igor Mammedov wrote: On Thu, 17 Feb 2022 10:38:32 +0100 Li Zhang wrote: On 2/17/22 10:10 AM, Igor Mammedov wrote: On Wed, 16 Feb 2022 17:36:13 +0100 Li Zhang wrote: If there is no mem or memdev in numa configuration, it always reports the error as the following

Re: [PATCH 1/1] numa: check mem or memdev in numa configuration

2022-02-17 Thread Li Zhang
On 2/17/22 11:25 AM, Igor Mammedov wrote: On Thu, 17 Feb 2022 10:38:32 +0100 Li Zhang wrote: On 2/17/22 10:10 AM, Igor Mammedov wrote: On Wed, 16 Feb 2022 17:36:13 +0100 Li Zhang wrote: If there is no mem or memdev in numa configuration, it always reports the error as the following

Re: [PATCH 1/1] numa: check mem or memdev in numa configuration

2022-02-17 Thread Li Zhang
On 2/17/22 10:10 AM, Igor Mammedov wrote: On Wed, 16 Feb 2022 17:36:13 +0100 Li Zhang wrote: If there is no mem or memdev in numa configuration, it always reports the error as the following: total memory for NUMA nodes (0x0) should equal RAM size (0x1) This error is confusing

[PATCH 1/1] numa: check mem or memdev in numa configuration

2022-02-16 Thread Li Zhang
configuration. So it's better to check mem or memdev in numa configuration. Signed-off-by: Li Zhang --- hw/core/numa.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/core/numa.c b/hw/core/numa.c index 1aa05dcf42..11cbec51eb 100644 --- a/hw/core/numa.c +++ b/hw/core/numa.c @@ -132,6

Re: [PATCH] audio/dbus: Fix building with modules enabled on macOS

2022-02-08 Thread Li Zhang
he same problem when building master branch on my Linux server. This patch looks good to me and it fixes my problem. Reviewed-by: Li Zhang Thanks Li Zhang

[PATCH v3 1/1] multifd: Remove some redundant code

2022-01-27 Thread Li Zhang
Clean up some unnecessary code Signed-off-by: Li Zhang --- migration/multifd.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 3242f688e5..d44cc6670f 100644 --- a/migration/multifd.c +++ b/migration/multifd.c

Re: [PATCH v2 1/1] multifd: Remove some redundant code

2022-01-27 Thread Li Zhang
On 1/27/22 7:31 PM, Li Zhang wrote: On 1/27/22 7:11 PM, Li Zhang wrote: On 1/27/22 10:53 AM, Juan Quintela wrote: Li Zhang wrote: Clean up some unnecessary code Signed-off-by: Li Zhang Hi ---   migration/multifd.c | 12 +++-   1 file changed, 3 insertions(+), 9 deletions

Re: [PATCH v2 1/1] multifd: Remove some redundant code

2022-01-27 Thread Li Zhang
On 1/27/22 10:53 AM, Juan Quintela wrote: Li Zhang wrote: Clean up some unnecessary code Signed-off-by: Li Zhang Hi --- migration/multifd.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 3242f688e5

Re: [PATCH v2 1/1] multifd: Remove some redundant code

2022-01-27 Thread Li Zhang
On 1/27/22 7:11 PM, Li Zhang wrote: On 1/27/22 10:53 AM, Juan Quintela wrote: Li Zhang wrote: Clean up some unnecessary code Signed-off-by: Li Zhang Hi ---   migration/multifd.c | 12 +++-   1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/migration/multifd.c b

Re: [PATCH v2 1/1] multifd: Remove some redundant code

2022-01-27 Thread Li Zhang
On 1/27/22 10:53 AM, Juan Quintela wrote: Li Zhang wrote: Clean up some unnecessary code Signed-off-by: Li Zhang Hi --- migration/multifd.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 3242f688e5

Re: iotest 040, 041, intermittent failure in netbsd VM

2022-01-18 Thread Li Zhang
On 1/18/22 12:08 AM, John Snow wrote: On Mon, Jan 17, 2022 at 3:49 PM Peter Maydell wrote: On Mon, 17 Jan 2022 at 20:35, John Snow wrote: Can you please try applying this temporary patch and running `./check -qcow2 040 041` until you see a breakage and show me the output from that? With

Re: [PATCH] meson: build all modules by default

2022-01-07 Thread Li Zhang
: [test_deps, qtest_emulator], + depends: [test_deps, qtest_emulator, emulator_modules], env: qtest_env, args: ['--tap', '-k'], protocol: 'tap', Thanks. The issue is fixed. Tested-by: Li Zhang Thanks Li

Re: [PATCH 1/2] multifd: cleanup the function multifd_channel_connect

2022-01-06 Thread Li Zhang
ping On 12/22/21 12:30 PM, Li Zhang wrote: Cleanup multifd_channel_connect Signed-off-by: Li Zhang --- migration/multifd.c | 49 ++--- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index

Re: [PATCH v2 1/1] multifd: Remove some redundant code

2022-01-06 Thread Li Zhang
ping Any comments? Thanks Li On 12/17/21 11:12 AM, Li Zhang wrote: Clean up some unnecessary code Signed-off-by: Li Zhang --- migration/multifd.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 3242f688e5

Re: [PATCH 2/2] multifd: cleanup the function multifd_send_thread

2022-01-06 Thread Li Zhang
ping On 12/22/21 12:30 PM, Li Zhang wrote: Cleanup multifd_send_thread Signed-off-by: Li Zhang --- migration/multifd.c | 82 ++--- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index

test: test fails with --enable-modules

2021-12-27 Thread Li Zhang
Hi Paolo, I am running qtest with --enable-modules, it fails with error "qemu-system-x86_64: -accel qtest: invalid accelerator qtest" Here are the steps: 1. ./configure --target-list=x86_64-softmmu --enable-kvm --enable-modules 2. make -j8 check-qtest-x86_64 V=1 I found that the problem

[PATCH 1/2] multifd: cleanup the function multifd_channel_connect

2021-12-22 Thread Li Zhang
Cleanup multifd_channel_connect Signed-off-by: Li Zhang --- migration/multifd.c | 49 ++--- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 212be1ed04..4ec40739e0 100644 --- a/migration

[PATCH 0/2] multifd: cleanup some source code

2021-12-22 Thread Li Zhang
When looking into the multifd source code, some of them can be improved. This patchset is to cleanup the functions multifd_channel_connect and multfd_send_thead. The functions are tested without any errors. Li Zhang (2): multifd: cleanup the function multifd_channel_connect multifd

[PATCH 2/2] multifd: cleanup the function multifd_send_thread

2021-12-22 Thread Li Zhang
Cleanup multifd_send_thread Signed-off-by: Li Zhang --- migration/multifd.c | 82 ++--- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 4ec40739e0..7888d71bfe 100644 --- a/migration/multifd.c

[PATCH v2 1/1] multifd: Remove some redundant code

2021-12-17 Thread Li Zhang
Clean up some unnecessary code Signed-off-by: Li Zhang --- migration/multifd.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 3242f688e5..212be1ed04 100644 --- a/migration/multifd.c +++ b/migration/multifd.c

Re: [PATCH 1/1] multifd: Remove some redundant code

2021-12-17 Thread Li Zhang
c, local_err)) { goto cleanup; } return; } cleanup: multifd_new_send_channel_cleanup(p, sioc, local_err); } On 12/17/21 10:33 AM, Li Zhang wrote: Clean up some unnecessary code Signed-off-by: Li Zhang --- migration/multifd.c | 9 ++--- 1 fil

[PATCH 1/1] multifd: Remove some redundant code

2021-12-17 Thread Li Zhang
Clean up some unnecessary code Signed-off-by: Li Zhang --- migration/multifd.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 3242f688e5..1405cf95b8 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -854,9

Re: [PATCH v4 03/18] meson: require liburing >= 0.3

2021-12-15 Thread Li Zhang
On 11/24/21 2:01 PM, Daniel P. Berrangé wrote: openSUSE Leap 15.2 ships with liburing == 0.2 against which QEMU fails to build. ../util/fdmon-io_uring.c: In function ‘fdmon_io_uring_need_wait’: ../util/fdmon-io_uring.c:305:9: error: implicit declaration of function ‘io_uring_sq_ready’; did you

[PATCH v3 1/1] multifd: Shut down the QIO channels to avoid blocking the send threads when they are terminated

2021-12-07 Thread Li Zhang
=0x7ffc0c57, envp=0x7ffc0c578ab0) at ../softmmu/main.c:50 To make sure that the send threads could be terminated, IO channels should be shut down to avoid waiting IO. Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Daniel P. Berrangé Signed-off-by: Li Zhang --- v3 - >v2: Move the chan

Re: [PATCH v2 0/1] migration: multifd live migration improvement

2021-12-07 Thread Li Zhang
On 12/7/21 3:16 PM, Daniel P. Berrangé wrote: On Tue, Dec 07, 2021 at 02:45:10PM +0100, Li Zhang wrote: On 12/6/21 8:54 PM, Dr. David Alan Gilbert wrote: * Li Zhang (lizh...@suse.de) wrote: When testing live migration with multifd channels (8, 16, or a bigger number) and using qemu

Re: [PATCH v2 1/1] multifd: Shut down the QIO channels to avoid blocking the send threads when they are terminated.

2021-12-07 Thread Li Zhang
On 12/6/21 8:50 PM, Dr. David Alan Gilbert wrote: * Li Zhang (lizh...@suse.de) wrote: Thanks for Daniel's review. Hi David and Juan, Any comments for this patch? Yeh I think that's OK, so Reviewed-by: Dr. David Alan Gilbert I'd have a slight preference for it being before the post I

Re: [PATCH v2 0/1] migration: multifd live migration improvement

2021-12-07 Thread Li Zhang
On 12/6/21 8:54 PM, Dr. David Alan Gilbert wrote: * Li Zhang (lizh...@suse.de) wrote: When testing live migration with multifd channels (8, 16, or a bigger number) and using qemu -incoming (without "defer"), if a network error occurs (for example, triggering the kernel SYN flooding

Re: [PATCH 1/1] kvm: Clear variables which may not be used

2021-12-06 Thread Li Zhang
On 12/6/21 12:39 PM, Daniel P. Berrangé wrote: On Mon, Dec 06, 2021 at 12:27:38PM +0100, Li Zhang wrote: The variables msi, route in kvm_irqchip_send_msi may be uninitialised values in some cases. It's necessary to clear them. You say the patch is going to 'clear them' but Ah, sorry

[PATCH 1/1] kvm: Clear variables which may not be used

2021-12-06 Thread Li Zhang
The variables msi, route in kvm_irqchip_send_msi may be uninitialised values in some cases. It's necessary to clear them. Signed-off-by: Li Zhang --- accel/kvm/kvm-all.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index

Re: [PATCH 1/2] multifd: use qemu_sem_timedwait in multifd_recv_thread to avoid waiting forever

2021-12-06 Thread Li Zhang
On 11/29/21 4:49 PM, Dr. David Alan Gilbert wrote: * Daniel P. Berrangé (berra...@redhat.com) wrote: On Mon, Nov 29, 2021 at 11:20:08AM +, Dr. David Alan Gilbert wrote: * Daniel P. Berrangé (berra...@redhat.com) wrote: On Fri, Nov 26, 2021 at 04:31:53PM +0100, Li Zhang wrote: When

Re: [PATCH v2 1/1] multifd: Shut down the QIO channels to avoid blocking the send threads when they are terminated.

2021-12-06 Thread Li Zhang
Thanks for Daniel's review. Hi David and Juan, Any comments for this patch? Thanks Li On 12/3/21 12:55 PM, Li Zhang wrote: When doing live migration with multifd channels 8, 16 or larger number, the guest hangs in the presence of the network errors such as missing TCP ACKs. At sender's

[PATCH v2 1/1] multifd: Shut down the QIO channels to avoid blocking the send threads when they are terminated.

2021-12-03 Thread Li Zhang
=0x7ffc0c57, envp=0x7ffc0c578ab0) at ../softmmu/main.c:50 To make sure that the send threads could be terminated, IO channels should be shut down to avoid waiting IO. Signed-off-by: Li Zhang --- migration/multifd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/migration/multifd.c b/migration

[PATCH v2 0/1] migration: multifd live migration improvement

2021-12-03 Thread Li Zhang
The patch is to fix the first problem, and the guest doesn't hang any more. But there is no better solution to fix the second problem yet. Li Zhang (1): multifd: Shut down the QIO channels to avoid blocking the send threads when they are terminated. migration/multifd.c | 3 +++ 1 file

Re: [PATCH 1/2] multifd: use qemu_sem_timedwait in multifd_recv_thread to avoid waiting forever

2021-12-01 Thread Li Zhang
On 12/1/21 3:09 PM, Daniel P. Berrangé wrote: On Wed, Dec 01, 2021 at 02:42:04PM +0100, Li Zhang wrote: On 12/1/21 1:22 PM, Daniel P. Berrangé wrote: On Wed, Dec 01, 2021 at 01:11:13PM +0100, Li Zhang wrote: On 11/29/21 3:50 PM, Dr. David Alan Gilbert wrote: * Li Zhang (lizh...@suse.de

Re: [PATCH 1/2] multifd: use qemu_sem_timedwait in multifd_recv_thread to avoid waiting forever

2021-12-01 Thread Li Zhang
On 12/1/21 1:22 PM, Daniel P. Berrangé wrote: On Wed, Dec 01, 2021 at 01:11:13PM +0100, Li Zhang wrote: On 11/29/21 3:50 PM, Dr. David Alan Gilbert wrote: * Li Zhang (lizh...@suse.de) wrote: On 11/29/21 12:20 PM, Dr. David Alan Gilbert wrote: * Daniel P. Berrangé (berra...@redhat.com

Re: [PATCH 1/2] multifd: use qemu_sem_timedwait in multifd_recv_thread to avoid waiting forever

2021-12-01 Thread Li Zhang
On 11/29/21 3:50 PM, Dr. David Alan Gilbert wrote: * Li Zhang (lizh...@suse.de) wrote: On 11/29/21 12:20 PM, Dr. David Alan Gilbert wrote: * Daniel P. Berrangé (berra...@redhat.com) wrote: On Fri, Nov 26, 2021 at 04:31:53PM +0100, Li Zhang wrote: When doing live migration with multifd

Re: [PATCH 1/2] multifd: use qemu_sem_timedwait in multifd_recv_thread to avoid waiting forever

2021-11-29 Thread Li Zhang
On 11/29/21 3:50 PM, Dr. David Alan Gilbert wrote: * Li Zhang (lizh...@suse.de) wrote: On 11/29/21 12:20 PM, Dr. David Alan Gilbert wrote: * Daniel P. Berrangé (berra...@redhat.com) wrote: On Fri, Nov 26, 2021 at 04:31:53PM +0100, Li Zhang wrote: When doing live migration with multifd

Re: [PATCH 1/2] multifd: use qemu_sem_timedwait in multifd_recv_thread to avoid waiting forever

2021-11-29 Thread Li Zhang
On 11/29/21 12:20 PM, Dr. David Alan Gilbert wrote: * Daniel P. Berrangé (berra...@redhat.com) wrote: On Fri, Nov 26, 2021 at 04:31:53PM +0100, Li Zhang wrote: When doing live migration with multifd channels 8, 16 or larger number, the guest hangs in the presence of the network errors

Re: [PATCH 1/2] multifd: use qemu_sem_timedwait in multifd_recv_thread to avoid waiting forever

2021-11-26 Thread Li Zhang
On 11/26/21 6:13 PM, Daniel P. Berrangé wrote: On Fri, Nov 26, 2021 at 06:00:24PM +0100, Li Zhang wrote: On 11/26/21 5:51 PM, Daniel P. Berrangé wrote: On Fri, Nov 26, 2021 at 05:44:04PM +0100, Li Zhang wrote: On 11/26/21 4:49 PM, Daniel P. Berrangé wrote: On Fri, Nov 26, 2021 at 04:31

Re: [PATCH 1/2] multifd: use qemu_sem_timedwait in multifd_recv_thread to avoid waiting forever

2021-11-26 Thread Li Zhang
On 11/26/21 5:51 PM, Daniel P. Berrangé wrote: On Fri, Nov 26, 2021 at 05:44:04PM +0100, Li Zhang wrote: On 11/26/21 4:49 PM, Daniel P. Berrangé wrote: On Fri, Nov 26, 2021 at 04:31:53PM +0100, Li Zhang wrote: When doing live migration with multifd channels 8, 16 or larger number, the guest

Re: [PATCH 1/2] multifd: use qemu_sem_timedwait in multifd_recv_thread to avoid waiting forever

2021-11-26 Thread Li Zhang
On 11/26/21 5:33 PM, Juan Quintela wrote: Li Zhang wrote: When doing live migration with multifd channels 8, 16 or larger number, the guest hangs in the presence of the network errors such as missing TCP ACKs. At sender's side: The main thread is blocked on qemu_thread_join

Re: [PATCH 2/2] migration: Set the socket backlog number to reduce the chance of live migration failure

2021-11-26 Thread Li Zhang
On 11/26/21 5:32 PM, Juan Quintela wrote: Li Zhang wrote: When creating the guest on destination with -incoming ip:port in QEMU command line, the source code that sets the backlog number as the same as multifd channels doesn't get called. So the number of backlog is always 1. It's very

Re: [PATCH 1/2] multifd: use qemu_sem_timedwait in multifd_recv_thread to avoid waiting forever

2021-11-26 Thread Li Zhang
On 11/26/21 4:49 PM, Daniel P. Berrangé wrote: On Fri, Nov 26, 2021 at 04:31:53PM +0100, Li Zhang wrote: When doing live migration with multifd channels 8, 16 or larger number, the guest hangs in the presence of the network errors such as missing TCP ACKs. At sender's side: The main thread

[PATCH 2/2] migration: Set the socket backlog number to reduce the chance of live migration failure

2021-11-26 Thread Li Zhang
is preferred to reduce the chance of the failure. Signed-off-by: Li Zhang --- migration/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/socket.c b/migration/socket.c index 05705a32d8..398d4c10fa 100644 --- a/migration/socket.c +++ b/migration/socket.c @@ -152,7

[PATCH 0/2] migration: multifd live migration improvement

2021-11-26 Thread Li Zhang
wo patches are to fix the two problems. Li Zhang (2): multifd: use qemu_sem_timedwait in multifd_recv_thread to avoid waiting forever migration: Set the socket backlog number to reduce chance of live migration failure migration/multifd.c | 2 +- migration/socket.c | 2 +- 2 files

[PATCH 1/2] multifd: use qemu_sem_timedwait in multifd_recv_thread to avoid waiting forever

2021-11-26 Thread Li Zhang
in clone () at /lib64/libc.so.6 Signed-off-by: Li Zhang --- migration/multifd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/multifd.c b/migration/multifd.c index 7c9deb1921..656239ca2a 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -1109,7 +1109,7

Re: [PATCH v3 RESEND 2/2] chardev: refactor qmp_chardev_add and qmp_chardev_change

2021-07-27 Thread Li Zhang
Hi all, Any comments for this patch? On Fri, Jul 9, 2021 at 6:11 PM Li Zhang wrote: > > To improve the problematic source code in qmp_chardev_change > and some redundant source code, the functions qmp_chardev_add > and qmp_chardev_change are refactored. It is mentioned in thr

Re: [PATCH v3 RESEND 1/2] qmp: Support chardev-change

2021-07-27 Thread Li Zhang
Hi all, Any comments for this patch? On Fri, Jul 9, 2021 at 6:11 PM Li Zhang wrote: > > For some scenarios, we'd like to hot-add a monitor device. But QEMU > doesn't support that, yet. It does support hot-swapping character > backends with QMP command chardev-change. This let

Re: [PATCH v3 RESEND 2/2] chardev: refactor qmp_chardev_add and qmp_chardev_change

2021-07-14 Thread Li Zhang
Ping On Fri, Jul 9, 2021 at 6:11 PM Li Zhang wrote: > > To improve the problematic source code in qmp_chardev_change > and some redundant source code, the functions qmp_chardev_add > and qmp_chardev_change are refactored. It is mentioned in thread: > https://lists.nongnu.org/ar

Re: [PATCH v3 RESEND 1/2] qmp: Support chardev-change

2021-07-14 Thread Li Zhang
Ping On Fri, Jul 9, 2021 at 6:11 PM Li Zhang wrote: > > For some scenarios, we'd like to hot-add a monitor device. But QEMU > doesn't support that, yet. It does support hot-swapping character > backends with QMP command chardev-change. This lets us pre-add a > monitor with a

[PATCH v3 RESEND 1/2] qmp: Support chardev-change

2021-07-09 Thread Li Zhang
the chardev-change fails with "Chardev user does not support chardev hotswap" because monitors don't provide the required callback. Implement it for QMP monitors. Signed-off-by: Li Zhang --- v3 -> v2: * Rework the patch which is to add hotswap for QMP device https://lists.nongnu.org

[PATCH v3 RESEND 2/2] chardev: refactor qmp_chardev_add and qmp_chardev_change

2021-07-09 Thread Li Zhang
To improve the problematic source code in qmp_chardev_change and some redundant source code, the functions qmp_chardev_add and qmp_chardev_change are refactored. It is mentioned in thread: https://lists.nongnu.org/archive/html/qemu-devel/2021-04/msg03167.html Signed-off-by: Li Zhang

Re: [PATCH v3 1/2] qmp: Support chardev-change for QMP device

2021-07-06 Thread Li Zhang
know what the problem is. On Tue, Jul 6, 2021 at 9:15 PM Li Zhang wrote: > > For some scenarios, we'd like to hot-add a monitor device. But QEMU > doesn't support that, yet. It does support hot-swapping character > backends with QMP command chardev-change. This lets us pre-add

[PATCH v3 2/2] chardev: refactor qmp_chardev_add and qmp_chardev_change

2021-07-06 Thread Li Zhang
To improve the problematic source code as Markus mentioned before and some redundant source code, it is refactored in the functions qmp_chardev_add and qmp_chardev_change. https://lists.nongnu.org/archive/html/qemu-devel/2021-04/msg03167.html Signed-off-by: Li Zhang --- chardev/char.c | 72

[PATCH v3 1/2] qmp: Support chardev-change for QMP device

2021-07-06 Thread Li Zhang
the chardev-change fails with "Chardev user does not support chardev hotswap" because monitors don't provide the required callback. Implement it for QMP monitors. Signed-off-by: Li Zhang --- v3 -> v2: * rework the patch according. * refactor the source code of chardev. monitor/monit

Migration: multifd problems

2021-06-03 Thread Li Zhang
Hi all, I tried live migration with multifd enabled. The guest on the source side hangs there when it is migrated with the setting multifd-channels = 16. It works well when set multifd-channels as 2,4, 8. Qemu version: qemu-6.0.50: Latest commit: commit c313e52e6459de2e9064767083a0c949c476e32b

Re: [PATCHv2 1/1] Support monitor chardev hotswap with QMP

2021-04-19 Thread Li Zhang
On Sat, Apr 17, 2021 at 10:02 AM Markus Armbruster wrote: > > Marc-André Lureau writes: > > > Hi > > > > On Fri, Apr 16, 2021 at 6:59 PM Marc-André Lureau < > > marcandre.lur...@gmail.com> wrote: > > > >> Hi > >> > >> On Fri, Apr 16, 2021 at 6:51 PM Markus Armbruster > >> wrote: > >> > >>>

Re: [PATCHv2 1/1] Support monitor chardev hotswap with QMP

2021-04-16 Thread Li Zhang
prising me. Wouldn't it > make more sense to support it rather than having a pre-opened null-based > monitor that can have its chardev swapped? It's the best way to support hot-add/remove monitor devices. But we would like to use it as soon as possible, so I use hotswap currently. If po

Re: [PATCHv2 1/1] Support monitor chardev hotswap with QMP

2021-04-16 Thread Li Zhang
On Fri, Apr 16, 2021 at 4:50 PM Markus Armbruster wrote: > > Marc-André, I'd like your opinion for this one, in particular the use of > g_source_remove(). > > Li Zhang writes: > > > For some scenarios, it needs to hot-add a monitor device. > > But QEMU doesn't supp

Re: [PATCH 2/2] Support monitor chardev hotswap with QMP

2021-04-16 Thread Li Zhang
When I tried chardev-change, it reports this error: { "error": { "class": "GenericError", "desc": "Chardev user does not support chardev hotswap" } } On Fri, Apr 16, 2021 at 11:33 AM Markus Armbruster wrote: > >

Re: [PATCHv2 1/1] Support monitor chardev hotswap with QMP

2021-04-15 Thread Li Zhang
Ping On Tue, Apr 13, 2021 at 11:37 PM Li Zhang wrote: > > For some scenarios, it needs to hot-add a monitor device. > But QEMU doesn't support hotplug yet. It also works by adding > a monitor with null backend by default and then change its > backend to socket by QMP command

[PATCHv2 1/1] Support monitor chardev hotswap with QMP

2021-04-13 Thread Li Zhang
p with QMP. Signed-off-by: Li Zhang Reviewed-by: Pankaj Gupta --- v1 -> v2: - Change mutex lock mon_lock section - Fix indentation problems monitor/monitor-internal.h | 3 +++ monitor/monitor.c | 2 +- monitor/qmp.c | 43 +++--- 3 file

Re: [PATCH 2/2] Support monitor chardev hotswap with QMP

2021-04-13 Thread Li Zhang
On Tue, Apr 13, 2021 at 10:58 AM Daniel P. Berrangé wrote: > > On Tue, Apr 13, 2021 at 08:40:59AM +0200, Markus Armbruster wrote: > > Li Zhang writes: > > > > > From: Li Zhang > > > > > > For some scenarios, it needs to hot-add a monitor devic

Re: [PATCH 2/2] Support monitor chardev hotswap with QMP

2021-04-13 Thread Li Zhang
On Tue, Apr 13, 2021 at 8:41 AM Markus Armbruster wrote: > > Li Zhang writes: > > > From: Li Zhang > > > > For some scenarios, it needs to hot-add a monitor device. > > But QEMU doesn't support hotplug yet. It also works by adding > > a monitor with null

Re: [PATCH 2/2] Support monitor chardev hotswap with QMP

2021-04-12 Thread Li Zhang
. On Mon, Apr 12, 2021 at 3:10 PM Markus Armbruster wrote: > Li Zhang writes: > > > Hi Markus, > > > > Any suggestions on this patch? > > I understand PATCH 1/2 got superseded by Lukas's "[PATCH v8 0/4] yank: > Add chardev tests and fixes". I trust Ma

Re: [PATCH 2/2] Support monitor chardev hotswap with QMP

2021-04-12 Thread Li Zhang
Hi Markus, Any suggestions on this patch? Thanks Li On Fri, Mar 26, 2021 at 3:40 PM Markus Armbruster wrote: > Li Zhang writes: > > > Hi, > > > > Any comments about this patch? > > I wanted to review this before my Easter break, but I'm out of time :( > >

Re: [PATCH 2/2] Support monitor chardev hotswap with QMP

2021-03-26 Thread Li Zhang
On Fri, Mar 26, 2021 at 3:40 PM Markus Armbruster wrote: > Li Zhang writes: > > > Hi, > > > > Any comments about this patch? > > I wanted to review this before my Easter break, but I'm out of time :( > > When I'm back (April 6), I'll check whether it still ne

Re: [PATCH 2/2] Support monitor chardev hotswap with QMP

2021-03-23 Thread Li Zhang
Hi, Any comments about this patch? Thanks Li On Mon, Mar 15, 2021 at 6:07 PM Li Zhang wrote: > From: Li Zhang > > For some scenarios, it needs to hot-add a monitor device. > But QEMU doesn't support hotplug yet. It also works by adding > a monitor with null backend by default

Re: [PATCH 4/5] chardev/char.c: Always pass id to chardev_new

2021-03-22 Thread Li Zhang
Looks good to me. I have tested this series, it works well. Tested-by: Li Zhang Thanks Li On Mon, Mar 22, 2021 at 12:35 AM Lukas Straub wrote: > Always pass the id to chardev_new, since it is needed to register > the yank instance for the chardev. Also, after checking that > noth

Re: [PATCH 1/2] Fix the segment fault when calling yank_register_instance

2021-03-16 Thread Li Zhang
lur...@gmail.com> wrote: > Hi > > On Tue, Mar 16, 2021 at 6:46 PM Li Zhang wrote: > >> Hi Marc-André, >> >> By looking into chardev and yank_register_function logic, this old >> chardev is registered according to the chardev label. >> So it's been in yank

Re: [PATCH 1/2] Fix the segment fault when calling yank_register_instance

2021-03-16 Thread Li Zhang
gt; > On Mon, Mar 15, 2021 at 9:22 PM Li Zhang wrote: > >> From: Li Zhang >> >> When executing the QMP commands "chardev-change" to change the >> backend device to socket, it will cause a segment fault because >> it assumes chr->label as

Re: [PATCH 1/2] Fix the segment fault when calling yank_register_instance

2021-03-16 Thread Li Zhang
5, 2021 at 7:51 PM Marc-André Lureau < marcandre.lur...@gmail.com> wrote: > Hi > > On Mon, Mar 15, 2021 at 9:22 PM Li Zhang wrote: > >> From: Li Zhang >> >> When executing the QMP commands "chardev-change" to change the >> backend device to socket,

[PATCH 1/2] Fix the segment fault when calling yank_register_instance

2021-03-15 Thread Li Zhang
From: Li Zhang When executing the QMP commands "chardev-change" to change the backend device to socket, it will cause a segment fault because it assumes chr->label as non-NULL in function yank_register_instance. The function qmp_chardev_change calls chardev_new, which label is NULL

[PATCH 2/2] Support monitor chardev hotswap with QMP

2021-03-15 Thread Li Zhang
From: Li Zhang For some scenarios, it needs to hot-add a monitor device. But QEMU doesn't support hotplug yet. It also works by adding a monitor with null backend by default and then change its backend to socket by QMP command "chardev-change". So this patch is to support monit

Re: [PATCH 1/1] Avoid migration if guest is in postmigrated status

2020-12-09 Thread Li Zhang
Thanks for telling me that. I didn't notice this patch. I just caught this error when I used it and read the source code, it should be fixed. Thanks Li On Wed, Dec 9, 2020 at 5:23 PM David Edmondson wrote: > On Wednesday, 2020-12-09 at 07:20:29 GMT, Li Zhang wrote: > > > This patch

[PATCH 1/1] Avoid migration if guest is in postmigrated status

2020-12-08 Thread Li Zhang
#migrate "exec:cat>file" twice on source host, block error: bdrv_inactivate_recurse: Assertion `!(bs->open_flags & BDRV_O_INACTIVE)' failed Signed-off-by: Li Zhang --- migration/migration.c | 5 + 1 file changed, 5 insertions(+) diff --git a/migration/migration.c b/migrati

Re: [Qemu-devel] [PATCH 0/3] arm/virt: refine virt.c code and implement hot_add_cpu interface

2017-05-29 Thread Li Zhang
> 在 2017年5月29日,下午6:43,Igor Mammedov <imamm...@redhat.com> 写道: > > On Sat, 27 May 2017 10:32:33 +0800 > Li Zhang <zhlci...@gmail.com> wrote: > >>> On Fri, May 26, 2017 at 7:21 PM, Igor Mammedov <imamm...@redhat.com> wrote: >>> On Fri, 26 May 2

Re: [Qemu-devel] [PATCH 0/3] arm/virt: refine virt.c code and implement hot_add_cpu interface

2017-05-26 Thread Li Zhang
On Fri, May 26, 2017 at 7:21 PM, Igor Mammedov <imamm...@redhat.com> wrote: > On Fri, 26 May 2017 17:21:05 +0800 > Li Zhang <zhlci...@gmail.com> wrote: > >> From: Li Zhang <li.zh...@hxt-semitech.com> >> >> virt machine doesn't support hot_add_cpu

[Qemu-devel] [PATCH 3/3] arm/virt: Implement hot_add_cpu interface

2017-05-26 Thread Li Zhang
From: Li Zhang <li.zh...@hxt-semitech.com> This patch is to add add_hot_cpu interface. Signed-off-by: Li Zhang <li.zh...@hxt-semitech.com> --- hw/arm/virt.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 31314c1..c7

[Qemu-devel] [PATCH 1/3] arm/virt: Refine fdt_add_cpu_nodes code

2017-05-26 Thread Li Zhang
From: Li Zhang <li.zh...@hxt-semitech.com> Refind fdt_add_cpu_nodes code and add a new function fdt_add_cpu_node, which can be called by hot_add_cpu function. Signed-off-by: Li Zhang <li.zh...@hxt-semitech.com> --- hw/arm/

[Qemu-devel] [PATCH 2/3] arm/virt: Refine code of machvirt_init

2017-05-26 Thread Li Zhang
From: Li Zhang <li.zh...@hxt-semitech.com> This patch is to refine cpu related in machvirt_init and add virt_new_cpu function which can be called by hot_add_cpu. Signed-off-by: Li Zhang <li.zh...@hxt-semitech.com> --- hw/arm/

  1   2   3   >