From: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org
Subject: Re: [PATCH 2/3] c/r: Add UTS support (v6)
Date: Thu, 02 Apr 2009 10:54:10 -0700 [thread overview]
Message-ID: <87wsa32b7h.fsf@caffeine.danplanet.com> (raw)
In-Reply-To: 20090402174451.GC9984@us.ibm.com
SH> One thing to note is that this will drive the ns cgroup bananas.
SH> It might still be worthwhile collecting the flags for all the
SH> to-be-unshared namespaces, and then doing all of the unsharing at
SH> once.
Okay, that's fair.
SH> Futhermore, you do sys_unshare here, then further down you do
SH> another copy_namespaces(CLONE_NEWUTS)?
That's in the case where our UTS namespace has already been created by
a previous task. We need to copy_namespaces() in order to get a new
nsproxy (since our nsproxy must be copied if we no longer share all
namespaces with our parent). I have to pass a clone flag to it to get
it to do anything. I promptly drop my hold on that new UTS namespace
and replace it in my new nsproxy with the one from the objhash that my
predecessor created (which is kinda ugly).
SH> Finally, it seems to me every task will unshare(CLONE_NEWUTS), no?
SH> Where is the check done (and stored) for whether this task has a
SH> different utsns from its parent?
No, tasks only unshare() if their UTS namespace objref is not found in
the objhash (thus indicating that they're the first of that namespace
to be restarted).
Perhaps you're referring to the fact that all tasks call
copy_namespaces() (if they're not the first). You're correct there,
but I'm not sure that a check to see if we need to
(i.e. task->nsproxy->uts == uts) because at the time that the tasks
were created, none of them had done their unshare() yet).
SH> Save identifiers for all of the namespaces at the top of the
SH> checkpoint image; have restart create a set of dummy tasks, enough
SH> to contain all of the new namespaces; have each unshare their
SH> namespaces; then, as each real new task is restarted, manually
SH> create a new nsproxy and link it to all of the required new
SH> namespaces.
Well, that's an option I suppose. Oren said he wanted to avoid an
additional loop over all tasks during checkpoint and preferred that it
all be stored with the task itself. Oren?
--
Dan Smith
IBM Linux Technology Center
email: danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org
next prev parent reply other threads:[~2009-04-02 17:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-31 20:58 c/r: Add UTS support Dan Smith
[not found] ` <1238533107-11796-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-03-31 20:58 ` [PATCH 1/3] Make cr_may_checkpoint_task() check each namespace individually Dan Smith
[not found] ` <1238533107-11796-2-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-04-02 17:50 ` Serge E. Hallyn
2009-03-31 20:58 ` [PATCH 2/3] c/r: Add UTS support (v6) Dan Smith
[not found] ` <1238533107-11796-3-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-04-02 17:44 ` Serge E. Hallyn
2009-04-02 17:54 ` Dan Smith [this message]
[not found] ` <87wsa32b7h.fsf-FLMGYpZoEPULwtHQx/6qkW3U47Q5hpJU@public.gmane.org>
2009-04-06 2:33 ` Oren Laadan
2009-04-02 17:48 ` Serge E. Hallyn
2009-04-02 17:58 ` Serge E. Hallyn
[not found] ` <20090402175804.GC21178-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-04-02 18:06 ` Dan Smith
2009-04-02 18:09 ` Serge E. Hallyn
[not found] ` <20090402180936.GE21178-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-04-02 18:10 ` Dan Smith
2009-03-31 20:58 ` [PATCH 3/3] Stub implementation of IPC namespace c/r (v2) Dan Smith
[not found] ` <1238533107-11796-4-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-04-02 18:06 ` Serge E. Hallyn
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=87wsa32b7h.fsf@caffeine.danplanet.com \
--to=danms-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=serue-r/Jw6+rmf7HQT0dZR+AlfA@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox