在 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 thing I missed: maybe we want to sync dirty before stop, so the value will
be more accurate.  Perhaps a call to memory_global_dirty_log_sync() here?
seems good, if the dirty ring reaper is sleeping, we can sync log by
ourselves, making dirtyrate more accurate.

Btw, I commented here because there has the bql so it's easier; please still
remember to record the pages after sync is done!  Otherwise it'll be an effort
of no real use (which I think that's missing in your latest repost..).
my fault, not examing the code.


Reply via email to