lkml.org 
[lkml]   [2010]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [C/R ARM][PATCH 3/3] c/r: ARM implementation of checkpoint/restart
    On Tue, Mar 23, 2010 at 09:18:43PM +0000, Russell King - ARM Linux wrote:

    <snip> (sorry -- I'm not familiar with ARM so I can't respond to those)

    > > +/* dump the thread_struct of a given task */
    > > +int checkpoint_thread(struct ckpt_ctx *ctx, struct task_struct *t)
    > > +{
    > > + int ret;
    > > + struct ckpt_hdr_thread *h;
    > > + struct thread_info *ti = task_thread_info(t);
    > > +
    > > + h = ckpt_hdr_get_type(ctx, sizeof(*h), CKPT_HDR_THREAD);
    > > + if (!h)
    > > + return -ENOMEM;
    > > +
    > > + /*
    > > + * Store the syscall information about the checkpointed process
    > > + * as we need to know if the process was doing a syscall (and which)
    > > + * during restart.
    > > + */
    > > + h->syscall = ti->syscall;
    > > +
    > > + /*
    > > + * Store remaining thread-specific info.
    > > + */
    > > + h->tp_value = ti->tp_value;
    >
    > How do you safely obtain consistent information from a thread? Do you
    > temporarily stop it?

    It must be frozen with the cgroup freezer (which reuses the suspend freezer).
    sys_checkpoint moves the cgroup freezer into the CHECKPOINTING state which
    prevents tasks in that group from being thawed until just before checkpoint
    returns.

    Cheers,
    -Matt Helsley


    \
     
     \ /
      Last update: 2010-03-24 02:55    [W:0.020 / U:119.156 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site