Re: stop checkpointed process

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

 



Quoting Jianwei Liao (liaotoad1@xxxxxxxxx):
> 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
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux