[Devel] Re: Review: Can we move init_restart_ctx() up ?
Sukadev Bhattiprolu
sukadev at linux.vnet.ibm.com
Fri Oct 2 18:48:58 PDT 2009
Oren Laadan [orenl at librato.com] wrote:
|
|
| Sukadev Bhattiprolu wrote:
| >
| > Would it be easier/cleaner if we initialized the restart ctx soon after
| > allocating it ? Looks like we already have the information we need at that
| > point.
| >
| > That way, do_restart() won't need the 'pid' parameter and we anyway use
| > the 'if(ctx)' check to test for the coordinator.
|
| I put the {checkpoint,restart}-related work in {checkpoint,restart}.c,
| and leave sys.c "neutral".
|
| I also like the symmetry between do_checkpoint() and do_restart() :p
|
| > BTW, can we move the '->active_pid = -1' in init_restart_ctx() to
| > ckpt_ctx_alloc() itself ?
|
| @active_pid is specific to restart, that's why I initialize it there.
Ok. Spreading out the initialization code over different functions is a bit
confusing. Maybe we could call init_checkpoint_ctx() or init_restart_ctx()
from ckpt_ctx_alloc() (depending on the kflags parameter) - and keep the
symmetry/nuetrality, But not a big deal.
Thanks,
Sukadev
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list