Messages in this thread | | | Date | Mon, 19 Mar 2012 19:15:44 +0900 | From | Takuya Yoshikawa <> | Subject | Re: [PATCH 3/4] KVM: Switch to srcu-less get_dirty_log() |
| |
On Mon, 19 Mar 2012 17:34:49 +0800 Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> wrote:
> The current code is under the protection of s-rcu: > IIRC, it always holds s-rcu when write guest page and set dirty bit, > that mean the dirty page is logged either in the old dirty_bitmap or in the > current memslot->dirty_bitmap. Yes?
Yes.
I just wanted to explain that getting clear dirty bitmap by GET_DIRTY_LOG does not mean there is no dirty page: it just means that there was nothing logged when we updated the bitmap in get_dirty_log().
We cannot know if anything happend between the bitmap update and result check in the userspace.
So even when we get a clear bitmap, we need to stop the VCPU threads and then do GET_DIRTY_LOG once more for live migration.
The important thing is that every bit set by mark_page_dirty() can be found at some time in the future, including the final GET_DIRTY_LOG.
Takuya
| |