[Devel] Re: [RFC v6][PATCH 0/9] Kernel based checkpoint/restart

Greg Kurz gkurz at fr.ibm.com
Thu Oct 9 14:59:33 PDT 2008


On Thu, 2008-10-09 at 15:17 +0200, Ingo Molnar wrote:
> yeah, something like that. A key aspect of it is that is has to be very 
> low-key on the source code level - we dont want to sprinkle the kernel 
> with anything ugly. Perhaps something pretty explicit:
> 
>   current->flags |= PF_NOCR;
> 
> as we do the same thing today for certain facilities:
> 
>   current->flags |= PF_NOFREEZE;
> 
> you probably want to hide it behind:
> 
>   set_current_nocr();
> 

Being uncheckpointable is a transient and hopefully reversible state.
A set_current_cr() function is also needed and should be called at some
time to avoid abusive denials of checkpoint (DoC ?).

With the sys_remap_file_pages() example, set_current_cr() should be
called somewhere in sys_munmap() or even sys_remap_file_pages(). Some
code should be added to detect the mapping that lead the nocr state is
removed (a flag on the affected vma?) or fixed (checking the linearity
of mapping?). Would this code be low-key enough ?

> and have a set_task_nocr() as well, in case there's some proxy state 
> installed by another task.
> 
> Via such wrappers there's no overhead at all in the 
> !CONFIG_CHECKPOINT_RESTART case.
> 
> Plus you could drive the debug mechanism via it as well, by using a 
> trivial extension of the facility:
> 
>   set_current_nocr("CR: sys_remap_file_pages not supported yet.");
>   ...
>   set_task_nocr(t, "CR: PI futexes not supported yet.");
> 
> 	Ingo
> _______________________________________________
> Containers mailing list
> Containers at lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/containers
-- 
Gregory Kurz                                     gkurz at fr.ibm.com
Software Engineer @ IBM/Meiosys                  http://www.ibm.com
Tel +33 (0)534 638 479                           Fax +33 (0)561 400 420

"Anarchy is about taking complete responsibility for yourself."
        Alan Moore.

_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list