Re: [RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-02-27 Thread Peter Xu
On Mon, Feb 27, 2023 at 09:19:39PM +0800, Chuang Xu wrote: > Hi, Peter Hi, Chuang, > > On 2023/2/25 下午11:32, Peter Xu wrote: > > On Thu, Feb 23, 2023 at 11:28:46AM +0800, Chuang Xu wrote: > > > Hi, Peter > > Hi, Chuang, > > > > > On 2023/2/22 下午11:57, Peter Xu wrote: > > I don't see why it's wr

Re: [RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-02-27 Thread Chuang Xu
Hi, Peter On 2023/2/25 下午11:32, Peter Xu wrote: On Thu, Feb 23, 2023 at 11:28:46AM +0800, Chuang Xu wrote: Hi, Peter Hi, Chuang, On 2023/2/22 下午11:57, Peter Xu wrote: I don't see why it's wrong, and that's exactly what I wanted to guarantee, that if memory_region_update_pending==true when u

Re: [RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-02-25 Thread Peter Xu
On Thu, Feb 23, 2023 at 11:28:46AM +0800, Chuang Xu wrote: > Hi, Peter Hi, Chuang, > > On 2023/2/22 下午11:57, Peter Xu wrote: > > On Wed, Feb 22, 2023 at 02:27:55PM +0800, Chuang Xu wrote: > > > Hi, Peter > > Hi, Chuang, > > > > > Note that as I mentioned in the comment, we temporarily replace t

Re: [RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-02-22 Thread Chuang Xu
Hi, Peter On 2023/2/22 下午11:57, Peter Xu wrote: On Wed, Feb 22, 2023 at 02:27:55PM +0800, Chuang Xu wrote: Hi, Peter Hi, Chuang, Note that as I mentioned in the comment, we temporarily replace this value to prevent commit() and address_space_to_flatview() call each other recursively, and eve

Re: [RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-02-22 Thread Peter Xu
On Wed, Feb 22, 2023 at 02:27:55PM +0800, Chuang Xu wrote: > Hi, Peter Hi, Chuang, > Note that as I mentioned in the comment, we temporarily replace this value > to prevent commit() and address_space_to_flatview() call each other > recursively, > and eventually stack overflow. Sorry to have ove

Re: [RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-02-21 Thread Chuang Xu
Hi, Peter On 2023/2/22 上午4:36, Peter Xu wrote: On 2023/2/21 上午11:38, Chuang Xu wrote: I think we need a memory_region_transaction_commit_force() to force commit some transactions when load vmstate. This function is designed like this: /*  * memory_region_transaction_commit_force() is desgined

Re: [RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-02-21 Thread Peter Xu
On Tue, Feb 21, 2023 at 04:57:30PM +0800, Chuang Xu wrote: > Hi, Peter Hi, Chuang, > > This email is a supplement to the previous one. AFAICT I mostly agree with you, but see a few more comments below. > > On 2023/2/21 上午11:38, Chuang Xu wrote: > > > > I think we need a memory_region_transac

Re: [RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-02-21 Thread Chuang Xu
Hi, Peter This email is a supplement to the previous one. On 2023/2/21 上午11:38, Chuang Xu wrote: I think we need a memory_region_transaction_commit_force() to force commit some transactions when load vmstate. This function is designed like this: /*  * memory_region_transaction_commit_force(

Re: [RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-02-20 Thread Chuang Xu
Hi, Peter It seems that there is a problem with the code format in my last email. I adjusted the format and resend this to you. Hope the format of this email won't be wrong again..  :) On 2023/2/17 下午11:52, Peter Xu wrote: Hello, Chuang, On Fri, Feb 17, 2023 at 04:11:19PM +0800, Chuang Xu wrot

Re: [RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-02-20 Thread Chuang Xu
Hi, Peter On 2023/2/17 下午11:52, Peter Xu wrote: Hello, Chuang, On Fri, Feb 17, 2023 at 04:11:19PM +0800, Chuang Xu wrote: Error 1 was triggered by our sanity check. I try to add RCU_READ_LOCK_GUARD() in address_space_init() and it works. But I'm not sure if this code change is appropriate. If

Re: [RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-02-20 Thread Juan Quintela
Chuang Xu wrote: > Hi, Juan >> --target-list=x86_64-softmmu Compile withouth this line, that will compile all system emulators. If you pass "make check" there, I would think that you have done your part. Thanks, Juan.

Re: [RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-02-20 Thread Chuang Xu
Hi, Juan On 2023/2/16 上午3:10, Juan Quintela wrote: Chuang Xu wrote: In this version: Hi I had to drop this. It breaks migration of dbus-vmstate. .[K144/179 qemu:qtest+qtest-x86_64 / qtest-x86_64/virtio-net-failover ERROR 5.66s killed by signal 6 SIGABRT G_TEST_DBU

Re: [RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-02-17 Thread Peter Xu
Hello, Chuang, On Fri, Feb 17, 2023 at 04:11:19PM +0800, Chuang Xu wrote: > Error 1 was triggered by our sanity check. I try to add RCU_READ_LOCK_GUARD() > in address_space_init() and it works. But I'm not sure if this code change is > appropriate. If this change is not appropriate, we may need to

Re: [RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-02-17 Thread Chuang Xu
Hi, Peter! In my last email to Juan, I mentioned two errors. Now I want to discuss them with you. On 2023/2/16 下午11:41, Chuang Xu wrote: I ran qtest with reference to your environment, and finally reported two errors. Error 1(the same as yours):  QTEST_QEMU_BINARY=./qemu-system-x86_64 MALLOC

Re: [RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-02-16 Thread Chuang Xu
Hi, Juan Thanks for your test results! On 2023/2/16 上午3:10, Juan Quintela wrote: > Chuang Xu wrote: >> In this version: > Hi > > I had to drop this. It breaks migration of dbus-vmstate. Previously, I only focused on the precopy migration test in the normal scenario, but did not run qtest. So I n

Re: [RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-02-15 Thread Juan Quintela
Chuang Xu wrote: > In this version: Hi I had to drop this. It breaks migration of dbus-vmstate. .[K144/179 qemu:qtest+qtest-x86_64 / qtest-x86_64/virtio-net-failover ERROR 5.66s killed by signal 6 SIGABRT >>> G_TEST_DBUS_DAEMON=/mnt/code/qemu/multifd/tests/dbus-vmstate

Re: [RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-02-15 Thread Claudio Fontana
On 1/17/23 12:55, Chuang Xu wrote: > In this version: > > - rename rcu_read_locked() to rcu_read_is_locked(). > - adjust the sanity check in address_space_to_flatview(). > - improve some comments. > > The duration of loading non-iterable vmstate accounts for a significant > portion of downtime (s

Re: [RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-02-15 Thread Juan Quintela
Chuang Xu wrote: > In this version: > > - rename rcu_read_locked() to rcu_read_is_locked(). > - adjust the sanity check in address_space_to_flatview(). > - improve some comments. queued series. > > The duration of loading non-iterable vmstate accounts for a significant > portion of downtime (sta

Re: [RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-02-02 Thread Juan Quintela
Chuang Xu wrote: > In this version: > > - rename rcu_read_locked() to rcu_read_is_locked(). > - adjust the sanity check in address_space_to_flatview(). > - improve some comments. > > The duration of loading non-iterable vmstate accounts for a significant > portion of downtime (starting with the ti

Re: [RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-01-17 Thread Peter Xu
On Tue, Jan 17, 2023 at 07:55:08PM +0800, Chuang Xu wrote: > In this version: > > - rename rcu_read_locked() to rcu_read_is_locked(). > - adjust the sanity check in address_space_to_flatview(). > - improve some comments. Acked-by: Peter Xu -- Peter Xu

[RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-01-17 Thread Chuang Xu
In this version: - rename rcu_read_locked() to rcu_read_is_locked(). - adjust the sanity check in address_space_to_flatview(). - improve some comments. The duration of loading non-iterable vmstate accounts for a significant portion of downtime (starting with the timestamp of source qemu stop and