On 11/11/2011 08:11 AM, Anthony Liguori wrote:
I did a brain dump of my understanding of the various storage requirements for live migration.  I think it's accurate but I may have misunderstand some details so I would appreciate review.

I think given sections (1) and (2), the only viable thing is to require cache=none unless we get new interfaces to flush caches.
I have two questions:
1. why is "cache=writethrough" not reliable?  "O_DSYNC" can guarantee data is written on disk before the operation is ultimately completed. Even if there's synchronization from memory to disk still on-going when migration happens,  we needn't care about the dirty pages in host memory either because the queued request will be re-executed on destination host.  So I think it's reliable too.  Do I miss anything?

2. Can we flush cache for "cache=writeback" in the last phase of migration? I think it can resolve the problem of "cache coherent". But it could cause an uncertain guest downtime.

Thanks.
Mark