public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Matt Helsley <matthltc@us.ibm.com>
Cc: Tejun Heo <tj@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	Li Zefan <lizf@cn.fujitsu.com>, Andrey Vagin <avagin@openvz.org>,
	Pavel Emelyanov <xemul@parallels.com>
Subject: Re: [RFC] cgroups: freezer -- Allow to attach a task to a frozen cgroup
Date: Wed, 30 Nov 2011 10:48:57 +0400	[thread overview]
Message-ID: <20111130064857.GL1775@moon> (raw)
In-Reply-To: <20111129225853.GA693@count0.beaverton.ibm.com>

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

      parent reply	other threads:[~2011-11-30  6:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-28 12:08 [RFC] cgroups: freezer -- Allow to attach a task to a frozen cgroup Cyrill Gorcunov
2011-11-28 13:10 ` Andrey Vagin
2011-11-28 13:38   ` Cyrill Gorcunov
2011-11-28 14:03     ` Andrew Vagin
2011-11-28 15:00       ` Cyrill Gorcunov
2011-11-28 15:43         ` Andrew Wagin
2011-11-28 16:08 ` Tejun Heo
2011-11-28 16:31   ` Cyrill Gorcunov
2011-11-29 22:58   ` Matt Helsley
2011-11-29 23:19     ` Tejun Heo
2011-11-30  6:48     ` Cyrill Gorcunov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111130064857.GL1775@moon \
    --to=gorcunov@gmail.com \
    --cc=avagin@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=matthltc@us.ibm.com \
    --cc=tj@kernel.org \
    --cc=xemul@parallels.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox