On 11/01/2018 01:26 AM, Wanpeng Li wrote: > > So the issue here is the same when I enable EPT D bit dirty log for > Haswell 4 years ago, qemu will hold the BQL qemu_mutex_lock_iothread > for every rounds of get_dirty_log calls, that's why I didn't observe > real benefit when comparing to write protect at that time. Btw, why D > bit dirty log is worse in blackout period? > The reason D-bit based logging is worse in blackout period is because get_dirty_log needs to scan all the PTEs to gather the D bits, which takes more time than just scanning the dirty bitmap. Since the final get_dirty_log call needs to happen during blackout, so this would increase the blackout time. This is why we switch to write protection mode immediately before entering blackout. Thanks, Junaid