From: "Serge E. Hallyn" <serge@hallyn.com>
To: Louis Rilling <Louis.Rilling@kerlabs.com>
Cc: "Serge E. Hallyn" <serue@us.ibm.com>,
Linux Containers <containers@lists.osdl.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] linux-cr: nested pid namespaces (v3)
Date: Tue, 23 Mar 2010 09:46:31 -0500 [thread overview]
Message-ID: <20100323144631.GA21337@hallyn.com> (raw)
In-Reply-To: <20100323071431.GC4242@localdomain>
Quoting Louis Rilling (Louis.Rilling@kerlabs.com):
> On Tue, Mar 23, 2010 at 12:18:39AM -0500, Serge E. Hallyn wrote:
> > Support checkpoint and restart of tasks in nested pid namespaces.
> > We keep the original single pids_array to minimize memory
> > allocations. The pids array entries are augmented with a pidns
> > depth (relative to the container init's pidns, and an "rpid" which
> > is the pid in the checkpointer's pidns (or 0 if no valid pid exists).
> > The rpid will be used by userspace to gather more information (like
> > /proc/$$/mountinfo) after the kernel sys_checkpoint. If any tasks
> > are in nested pid namespace, another single array will hold all of
> > the vpids. At restart those are used by userspace to determine how
> > to call eclone(). Kernel ignores them.
> >
> > This patch also adds 'rpid' to struct ckpt_hdr_pids, which is not
> > needed for nested pid_ns support, but will be needed for the
> > userspace checkpointer to gather additional information (i.e.
> > /proc/pid/mountinfo) after sys_checkpoint() completes.
> >
> > Changelog:
> > Mar 22:
> > Use Louis Rilling's smarter ckpt_vpids algorithm
> > verbatim, to handle pid_ns depths > CKPT_HDR_PIDS_CHUNK,
> > as well as fix an apparent bug in my original code.
> >
> > As Louis suggested, use task_active_pid_ns() rather than
> > task->nsproxy->pid_ns. In fact it's a must, bc the
> > checkpointed task may be dead and have NULL
> > task->nsproxy->pid_ns.
>
> Hm, if task can be dead, then there is a much bigger issue:
> task->nsproxy is NULL. Or did I miss something?
Well, it's a zombie - checkpoint/checkpoint.c:may_checkpoint_task()
explicitly ignores nsproxy tests for zombies (but returns -EBUSY
for exit_state == EXIT_DEAD). So yeah, nsproxy is NULL, which is
why I have to use task_active_pid_ns() :)
-serge
next prev parent reply other threads:[~2010-03-23 14:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-23 5:18 [PATCH] linux-cr: nested pid namespaces (v3) Serge E. Hallyn
2010-03-23 5:20 ` [PATCH] user-ns: Nested pidns support (v3) Serge E. Hallyn
2010-03-23 7:14 ` [PATCH] linux-cr: nested pid namespaces (v3) Louis Rilling
2010-03-23 13:52 ` Serge E. Hallyn
2010-03-24 9:56 ` Louis Rilling
2010-03-23 14:46 ` Serge E. Hallyn [this message]
[not found] ` <20100323051839.GA16123-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-03-30 4:51 ` 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=20100323144631.GA21337@hallyn.com \
--to=serge@hallyn.com \
--cc=Louis.Rilling@kerlabs.com \
--cc=containers@lists.osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=serue@us.ibm.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 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.