Quoting Jianwei Liao ([email protected]):
> hi all,
> I am using ckpt-v18, everything is fine.
> i have read some of the code of ckpt, but i was wondering that where does
> kernel module to stop the checkpointee? (something related to context?) i
> hope you can point me out how to find such stuff.
> Can i use SIGSTOPand SIGCONT to do such things?
> Thank you very much.
> Liao

Userspace should do this in advance by using the freezer cgroup.  So
for instance if you are wanting to checkpoint /usr/bin/myapp, then
one way to do it is:

        (terminal 1)
        mkdir -p /cgroup
        mount -t cgroup -o freezer freezer /cgroup
        mkdir /cgroup/myapp

        (terminal 2)
        echo $$ > /cgroup/myapp/tasks
        /usr/bin/myapp

        (terminal 1)
        echo FROZEN > /cgroup/myapp/freezer.state
        pid=`pidof myapp`
        checkpoint $pid > myapp.ckpt
        echo THAWED > /cgroup/myapp/freezer.state

If the application hasn't been frozen using the freezer cgroup,
then sys_checkpoint() will return -EBUSY.

-serge
_______________________________________________
Containers mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/containers

_______________________________________________
Devel mailing list
[email protected]
https://openvz.org/mailman/listinfo/devel

Reply via email to