Re: [RFC] cgroups: freezer -- Allow to attach a task to a frozencgroup
From: Cyrill Gorcunov
Date: Wed Nov 30 2011 - 01:49:07 EST
On Tue, Nov 29, 2011 at 02:58:53PM -0800, Matt Helsley wrote:
> On Mon, Nov 28, 2011 at 08:08:44AM -0800, Tejun Heo wrote:
> > On Mon, Nov 28, 2011 at 04:08:13PM +0400, Cyrill Gorcunov wrote:
> > > In checkpoint/restore we need an ability to attach pids to
> > > a frozen cgroup. Thus once pid reaches a frozen cgroup it is
> > > not rejected, but the task get frozen immediately.
>
> Frankly, I don't see the need for this. I think you should explain
> it with more detail at the very least.
>
> Why can't they be frozen before being checkpointed? Assuming you've
> used SEIZE and spawned a new parasite thread, just move that thread to a
> cgroup for the parasitic threads then freeze the old cgroup.
>
Hi Matt,
At moment there is no way to use ptrace with frozen task (Tejun
will take a look into such ability once he get time for, as far
as I know).
Ideally we would like to move checkpointing tasks to cgroup,
freeze it there and _then_ run ptrace and inject parasite code
into it. Finally the parasite code would dump tasks contents,
detach itself and unfreeze tasks.
At restore time we would like to move the tasks being restored
into frozen cgroup before final jump to the original pt_regs the
task had at checkpoint time (it actually takes a few stages, ie once
memory and other resources are restored but task is not yet
switched to the former pt_regs, we move it into frozen cgroup,
and then the task get immediately frozen, finally once all processes
being restored reaches this point we unfreeze the cgroup and
they all switch to original registers contents and continue
execution).
Cyrill
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/