On Tue, Mar 04, 2014 at 01:02:44AM +0000, Huangpeng (Peter) wrote:
> > But back to the options:
> > 
> > If the host has enough free memory to fork QEMU, a small helper process can
> > be used to save the copy-on-write memory snapshot (thanks to fork(2)
> > semantics).  The hard part about the fork(2) approach is that QEMU isn't
> > really designed to fork, so work is necessary to reach a quiescent state 
> > for the
> > child process.
> > 
> > If there is not enough memory to fork, then a synchronous approach to
> > catching guest memory writes is needed.  I'm not sure if a good mechanism
> > for that exists but the simplest would be mprotect(2) and a signal handler
> > (which will make the guest run very slowly).
> > 
> > Stefan
> 
> In real production environment, memory over-commit or use as much memory as
> possible may be the normal case, so the fork semantics cannot meet the needs. 
>  

Yes, I think you're right.  The fork approach only works in the easy
case where there is plenty of free host memory.

> Is there any other proposals to implement vm-snapshot?

See the discussion by Paolo and Andrea about post-copy migration, which
adds kernel memory management features for tracking userspace page
faults.  Perhaps you can use that infrastructure to trap guest writes.

Stefan

Reply via email to