qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] lazy instance resume


From: Thomas Knauth
Subject: [Qemu-devel] lazy instance resume
Date: Thu, 4 Apr 2013 09:23:25 +0200

Dear all,

I'm interested in fast instance resume times, i.e., a migration where the source is a file on disk. The basic idea is that we don't need to read the entire memory dump from disk to kick off execution. This is similar to what is, for example, done with post-copy live migration. Resume from disk is admittedly less complex, but the underlying principle is the same.

My current idea is to write an exhaustive memory dump on suspend. Exhaustive because the dump generated by qemu applies some optimizations to reduce the dump's size, e.g., run-length-encoding of all-0 pages. To speed up the resume time, the exhaustive memory dump would be mmap()-ed for the correct MemoryRegion (MR), e.g., "pc.ram".

My quick and dirty prototype seems to work. I would nevertheless like to elicit feedback from more experienced people: which parts of qemu may cease to function, if the "pc.ram" MemoryRegion is an mmap()-ed file? Any trouble I should suspect down the line?

Ideally, I would like to "pre-fault" pages in the mmap-ed region, to reduce the guest's performance penalty at runtime. I'm also not sure about the exact flags with which to mmap(). PROT_PRIVATE has the benefit not writing intermediate changes to disk. On the other hand, with PROT_SHARED I would not need to explicitly write a dump again at the next suspend.

Thanks for your feedback,
Thomas.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]