[Devel] Re: [PATCH 0/6] /proc/pid/checkpointable

Serge E. Hallyn serue at us.ibm.com
Wed Mar 18 06:53:20 PDT 2009


Quoting Oren Laadan (orenl at cs.columbia.edu):
> 
> 
> Sukadev Bhattiprolu wrote:
> > From: Sukadev Bhattiprolu <sukadev at linux.vnet.ibm.com>
> > Date: Sat, 14 Mar 2009 10:21:07 -0700
> > Subject: [PATCH 6/6] Explain reason for task being uncheckpointable
> > 
> > Try to give an useful message on why a task is uncheckpointable.
> > 
> > Signed-off-by: Sukadev Bhattiprolu <sukadev at linux.vnet.ibm.com>
> > ---
> >  checkpoint/checkpoint.c    |   13 +++++++++----
> >  fs/proc/base.c             |   19 ++++++++++++++++++-
> >  include/linux/checkpoint.h |    7 +++++++
> >  3 files changed, 34 insertions(+), 5 deletions(-)
> > 
> 
> [...]
> 
> >  #ifdef CONFIG_CHECKPOINT_RESTART
> > +static char *explain_checkpointable(int reason)
> > +{
> > +	char *message;
> > +
> > +	switch(reason) {
> > +	case CR_CHECKPOINTABLE: message = "1"; break;
> > +	case CR_DEAD: 		message = "0 (dead)"; break;
> > +	case CR_NOT_FROZEN: 	message = "0 (not frozen)"; break;
> 
> Hmmm... so a task cannot test if it itself is checkpointable, because
> it will never be frozen and will fail right there before proceeding to
> addition (future) tests ?

No, no...  :

/* Verify that task is frozen, unless it is self-checkpoint */
if (t != current && !frozen(t))
-               return 0;
+               return CR_NOT_FROZEN;

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




More information about the Devel mailing list