From: Yasunori Goto <y-goto@jp.fujitsu.com>
To: "\"Chen, Hanxiao/? �ヨ霄\"" <chenhanxiao@cn.fujitsu.com>
Cc: "Eric W. Biederman (ebiederm@xmission.com)"
<ebiederm@xmission.com>,
"Serge Hallyn (serge.hallyn@ubuntu.com)"
<serge.hallyn@ubuntu.com>,
"Oleg Nesterov (oleg@redhat.com)" <oleg@redhat.com>,
"Richard Weinberger (richard@nod.at)" <richard@nod.at>,
"Pavel Emelyanov (xemul@parallels.com)" <xemul@parallels.com>,
"Vasily Kulikov (segoon@openwall.com)" <segoon@openwall.com>,
"'Daniel P. Berrange (berrange@redhat.com)'"
<berrange@redhat.com>,
"containers@lists.linux-foundation.org"
<containers@lists.linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC]Pid conversion between pid namespace
Date: Fri, 04 Jul 2014 14:34:30 +0900 [thread overview]
Message-ID: <20140704143422.6B90.E1E9C6FF@jp.fujitsu.com> (raw)
In-Reply-To: <5871495633F38949900D2BF2DC04883E55C374@G08CNEXMBPEKD02.g08.fujitsu.local>
Chen-san,
I would like to recommend that you summarize pros/cons for all ideas so far.
For example,
---------
A) make new system call for transrate
A-1) systemcall(ID, NS1, NS2) into (ID).
pros:
- foo
- baa
cons:
- hoge
- hogehogehoge
A-2) pid_t getnspid(pid_t query_pid, pid_t observer_pid)
(ditto)
B) make/change proc file/directories
B-1) expand /proc/pid/status
(ditto)
B-2) /proc/<pidX>/ns/proc/ which would contain everything
from /proc/<pidX inside the namespace>/.
(ditto)
------
Please make clear what is the good/bad point of each opinion by the above,
- Is it hard to keep compatiblity?
- Is it hard to understand for administorator/programmer?
- Is it difficult to show for "nested containers"?
- Is userland tool necessary?
- any other problems?
I hope it will be good discussion by the above.
Thanks,
> Hi,
>
> We had some discussions on how to carry out
> pid conversion between pid namespace via:
> syscall[1] and procfs[2].
>
> Pavel suggested that a syscall like
> (ID, NS1, NS2) into (ID).
>
> Serge suggested that a syscall
> pid_t getnspid(pid_t query_pid, pid_t observer_pid).
>
>
> Eric and Richard suggested a procfs solution is
> more appropriate.
>
> Oleg suggested that we should expand /proc/pid/status
> to report this kind of information.
>
> And Richard suggested adding a directory like
> /proc/<pidX>/ns/proc/ which would contain everything
> from /proc/<pidX inside the namespace>/.
>
> As procfs provided a more user friendly interface,
> how about expose all sets of tgid, pid, pgid, sid
> by expanding /proc/PID/status in procfs?
> And we could also expose ns hierarchy under /proc,
> which could be another reference.
>
> Ex:
> init_pid_ns ns1 ns2
> t1 2
> t2 `- 3 1
> t3 `- 4 `- 5 1
>
> We could get in /proc/t3/status:
> NSpid: 4 5 1
> We knew that pid 1 in container is pid 4 in init ns.
>
> And we could get ns hierarchy under /proc/ns_hierarchy like:
> init_ns->ns1->ns2 (as the result of readlink)
> ->ns3
> We knew that t3 in ns2, and its hierarchy.
>
> How these ideas looks like?
> Any comments would be appreciated.
>
> Thanks,
> - Chen
>
>
> a) syscall
> http://lwn.net/Articles/602987/
>
> b) procfs
> http://www.spinics.net/lists/kernel/msg1751688.html
>
--
Yasunori Goto <y-goto@jp.fujitsu.com>
next prev parent reply other threads:[~2014-07-04 5:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-03 12:18 chenhanxiao
2014-07-04 5:34 ` Yasunori Goto [this message]
2014-07-09 10:34 ` chenhanxiao
2014-07-15 4:16 ` Serge Hallyn
2014-07-21 10:47 ` chenhanxiao
2014-07-25 17:34 ` Serge Hallyn
2014-07-28 8:14 ` Hu Tao
2014-07-28 13:24 ` Serge Hallyn
2014-07-25 10:01 ` chenhanxiao
2014-08-04 22:20 ` Serge Hallyn
2014-08-07 10:03 ` chenhanxiao
2014-08-07 16:11 ` Serge Hallyn
2014-08-08 9:30 ` chenhanxiao
2014-08-28 13:49 ` Serge E. Hallyn
2014-08-29 9:59 ` chenhanxiao
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=20140704143422.6B90.E1E9C6FF@jp.fujitsu.com \
--to=y-goto@jp.fujitsu.com \
--cc=berrange@redhat.com \
--cc=chenhanxiao@cn.fujitsu.com \
--cc=containers@lists.linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=richard@nod.at \
--cc=segoon@openwall.com \
--cc=serge.hallyn@ubuntu.com \
--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
all inboxes | Powered by JetHome®