Re: [PATCH v10 6/6] migration/dirtyrate: implement dirty-ring dirtyrate calculation

2021-06-29 Thread Hyman
在 2021/6/29 23:18, Peter Xu 写道: On Tue, Jun 29, 2021 at 09:04:07PM +0800, Hyman wrote: 在 2021/6/29 7:05, Peter Xu 写道: On Mon, Jun 28, 2021 at 12:27:46AM +0800, huang...@chinatelecom.cn wrote: +static void dirtyrate_global_dirty_log_stop(void) +{ +qemu_mutex_lock_iothread(); One thin

Re: [PATCH v10 6/6] migration/dirtyrate: implement dirty-ring dirtyrate calculation

2021-06-29 Thread Peter Xu
On Tue, Jun 29, 2021 at 09:04:07PM +0800, Hyman wrote: > > > 在 2021/6/29 7:05, Peter Xu 写道: > > On Mon, Jun 28, 2021 at 12:27:46AM +0800, huang...@chinatelecom.cn wrote: > > > +static void dirtyrate_global_dirty_log_stop(void) > > > +{ > > > +qemu_mutex_lock_iothread(); > > > > One thing I m

Re: [PATCH v10 6/6] migration/dirtyrate: implement dirty-ring dirtyrate calculation

2021-06-29 Thread Hyman
在 2021/6/29 7:05, Peter Xu 写道: On Mon, Jun 28, 2021 at 12:27:46AM +0800, huang...@chinatelecom.cn wrote: +static void dirtyrate_global_dirty_log_stop(void) +{ +qemu_mutex_lock_iothread(); One thing I missed: maybe we want to sync dirty before stop, so the value will be more accurate. P

Re: [PATCH v10 6/6] migration/dirtyrate: implement dirty-ring dirtyrate calculation

2021-06-28 Thread Peter Xu
On Mon, Jun 28, 2021 at 12:27:46AM +0800, huang...@chinatelecom.cn wrote: > +static void dirtyrate_global_dirty_log_stop(void) > +{ > +qemu_mutex_lock_iothread(); One thing I missed: maybe we want to sync dirty before stop, so the value will be more accurate. Perhaps a call to memory_global_d

[PATCH v10 6/6] migration/dirtyrate: implement dirty-ring dirtyrate calculation

2021-06-27 Thread huangy81
From: Hyman Huang(黄勇) use dirty ring feature to implement dirtyrate calculation. introduce mode option in qmp calc_dirty_rate to specify what method should be used when calculating dirtyrate, either page-sampling or dirty-ring should be passed. introduce "dirty_ring:-r" option in hmp calc_dirty