All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
Cc: Paul Menage <menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	Containers
	<containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
Subject: Re: [PATCH 4/4] cgroup freezer: --- replacement patch 4/4 (a)
Date: Thu, 4 Jun 2009 09:32:29 -0500	[thread overview]
Message-ID: <20090604143229.GA28586@us.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0906032008490.19096-CXF6herHY6ykSYb+qCZC/1i27PF6R63G9nwVQlTi/Pw@public.gmane.org>

Quoting Oren Laadan (orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org):
> 
> >From 6cdb7d9504a19ad88e6da8ad85374267c7acb1b2 Mon Sep 17 00:00:00 2001
> From: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
> Date: Wed, 3 Jun 2009 02:31:21 -0700
> Subject: [PATCH] cgroup freezer: Add CHECKPOINTING state to safeguard container checkpoint
> 
> The CHECKPOINTING state prevents userspace from unfreezing tasks until
> sys_checkpoint() is finished. When doing container checkpoint userspace
> will do:
> 
> 	echo FROZEN > /cgroups/my_container/freezer.state
> 	...
> 	rc = sys_checkpoint( <pid of container root> );
> 
> To ensure a consistent checkpoint image userspace should not be allowed
> to thaw the cgroup (echo THAWED > /cgroups/my_container/freezer.state)
> during checkpoint.
> 
> "CHECKPOINTING" can only be set on a "FROZEN" cgroup using the checkpoint
> system call. Once in the "CHECKPOINTING" state, the cgroup may not leave until
> the checkpoint system call is finished and ready to return. Then the
> freezer state returns to "FROZEN". Writing any new state to freezer.state while
> checkpointing will return EBUSY. These semantics ensure that userspace cannot
> unfreeze the cgroup midway through the checkpoint system call.
> 
> The cgroup_freezer_begin_checkpoint() and cgroup_freezer_end_checkpoint()
> make relatively few assumptions about the task that is passed in. However the
> way they are called in do_checkpoint() assumes that the root of the container
> is in the same freezer cgroup as all the other tasks that will be
> checkpointed.
> 
> Matt Helsley's wrote the original patch.
> 
> Changlog:
>   [2009-Jun-03] change cgroup_freezer_{begin,end}_checkpoint() to take a
>   		struct cgroup_subsys_state pointer
> 		add struct cgroup_subsys_state *get_task_cgroup_freezer()
> 
> Signed-off-by: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
> Cc: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
> Cc: Paul Menage <menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
> Cc: Li Zefan <lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
> Cc: Cedric Le Goater <legoater-GANU6spQydw@public.gmane.org>

Looks good -

Acked-by: Serge Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>

to both.  I still don't see why you need a ref to the root_freezer,
but it doesn't hurt at any rate so I won't harp on it.

thanks,
-serge

  parent reply	other threads:[~2009-06-04 14:32 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-03  9:31 [PATCH 0/4] cgroup freezer: Fixes and CHECKPOINTING support Matt Helsley
2009-06-03  9:31 ` [PATCH 1/4] cgroup freezer: Fix buggy resume test for tasks frozen with cgroup freezer Matt Helsley
     [not found] ` <cover.1244019829.git.matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-06-03  9:31   ` Matt Helsley
     [not found]     ` <91260d5797bcf233ca54c7b41da8278e99b4ca66.1244019829.git.matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-06-03 16:05       ` Serge E. Hallyn
     [not found]         ` <20090603160551.GB7848-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-06-04  0:55           ` Li Zefan
     [not found]             ` <4A271B75.7090607-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2009-06-11 21:56               ` Matt Helsley
2009-06-11 21:56             ` Matt Helsley
2009-06-04  0:55         ` Li Zefan
2009-06-03 16:05     ` Serge E. Hallyn
2009-06-03  9:31   ` [PATCH 2/4] cgroup freezer: Avoid lazy state changes when convenient Matt Helsley
     [not found]     ` <03412f8681d89c99ac575330381ab49f6e5e61ba.1244019829.git.matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-06-03 16:10       ` Serge E. Hallyn
     [not found]         ` <20090603161046.GC7848-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-06-03 17:52           ` Matt Helsley
     [not found]             ` <20090603175242.GQ9285-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-06-03 18:15               ` Serge E. Hallyn
     [not found]                 ` <20090603181547.GA10141-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-06-04  3:18                   ` Matt Helsley
     [not found]                     ` <20090604031842.GR9285-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-06-07 21:36                       ` Nathan Lynch
2009-06-03 19:52       ` Serge E. Hallyn
2009-06-03  9:31   ` [PATCH 3/4] cgroup freezer: Update stale locking comments Matt Helsley
2009-06-03  9:31   ` [PATCH 4/4] cgroup freezer: Add CHECKPOINTING state to safeguard container checkpoint Matt Helsley
     [not found]     ` <89c3726813accffb7c51cd30ff93b79a4391f382.1244019829.git.matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-06-03 16:18       ` Serge E. Hallyn
     [not found]         ` <20090603161840.GD7848-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-06-04  0:01           ` Oren Laadan
     [not found]             ` <Pine.LNX.4.64.0906031957110.19096-CXF6herHY6ykSYb+qCZC/1i27PF6R63G9nwVQlTi/Pw@public.gmane.org>
2009-06-04  0:10               ` [PATCH 4/4] cgroup freezer: --- replacement patch 4/4 (a) Oren Laadan
     [not found]                 ` <Pine.LNX.4.64.0906032008490.19096-CXF6herHY6ykSYb+qCZC/1i27PF6R63G9nwVQlTi/Pw@public.gmane.org>
2009-06-04 10:34                   ` Matt Helsley
     [not found]                     ` <20090604103418.GW9285-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-06-04 13:44                       ` Oren Laadan
     [not found]                         ` <Pine.LNX.4.64.0906040939100.25421-CXF6herHY6ykSYb+qCZC/1i27PF6R63G9nwVQlTi/Pw@public.gmane.org>
2009-06-04 13:54                           ` Oren Laadan
2009-06-04 16:32                       ` Oren Laadan
2009-06-04 14:32                   ` Serge E. Hallyn [this message]
2009-06-04  0:12               ` [PATCH 4/4] cgroup freezer: --- replacement patch 4/4 (b) Oren Laadan
     [not found]                 ` <Pine.LNX.4.64.0906032011470.19096-CXF6herHY6ykSYb+qCZC/1i27PF6R63G9nwVQlTi/Pw@public.gmane.org>
2009-06-04 10:45                   ` Matt Helsley
     [not found]                     ` <20090604104527.GY9285-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-06-04 13:52                       ` Oren Laadan
2009-06-04 14:04                       ` Serge E. Hallyn
2009-06-04 10:44           ` [PATCH 4/4] cgroup freezer: Add CHECKPOINTING state to safeguard container checkpoint Matt Helsley
2009-06-03 16:53       ` Oren Laadan

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=20090604143229.GA28586@us.ibm.com \
    --to=serue-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.