From: Richard Weinberger <richard-/L3Ra7n9ekc@public.gmane.org>
To: "Chen,
Hanxiao" <chenhanxiao-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>,
"Eric W. Biederman"
<ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>,
Serge Hallyn
<serge.hallyn-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org>,
Oleg Nesterov <oleg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org"
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Cc: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org"
<containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Mateusz Guzik <mguzik-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH v8 1/2] procfs: show hierarchy of pid namespace
Date: Thu, 20 Nov 2014 22:29:42 +0100 [thread overview]
Message-ID: <546E5D46.4070805@nod.at> (raw)
In-Reply-To: <5871495633F38949900D2BF2DC04883E73748A47-ZEd+hNNJ6a6dJ4BS92+ASzz3u5zwRJJDAzI0kPv9QBlmR6Xm/wNWPw@public.gmane.org>
Am 20.11.2014 um 10:57 schrieb Chen, Hanxiao:
>
>
>> -----Original Message-----
>> From: containers-bounces@lists.linux-foundation.org
>> [mailto:containers-bounces@lists.linux-foundation.org] On Behalf Of Chen
>> Hanxiao
>> Sent: Tuesday, November 18, 2014 5:30 PM
>> To: Eric W. Biederman; Serge Hallyn; Oleg Nesterov; Richard Weinberger
>> Cc: containers@lists.linux-foundation.org; linux-kernel@vger.kernel.org;
>> Mateusz Guzik; David Howells
>> Subject: [PATCH v8 1/2] procfs: show hierarchy of pid namespace
>>
>> We lack of pid hierarchy information, and this will lead to:
>> a) we don't know pids' relationship, who is whose child:
>> /proc/PID/ns/pid only tell us whether two pids live in different ns
>> b) bring trouble to nested lxc container check/restore/migration
>> c) bring trouble to pid translation between containers;
>>
>> This patch will show the hierarchy of pid namespace
>> by pidns_hierarchy like:
>>
>> <init_PID> <parent_of_init_PID> <relative PID level>
>>
>> Ex:
>> [root@localhost ~]#cat /proc/pidns_hierarchy
>> 18060 1 1
>> 18102 18060 2
>> 1534 18102 3
>> 1600 18102 3
>> 1550 1 1
>> *Note: numbers represent the pid 1 in different ns
>>
>> It shows the pid hierarchy below:
>>
>> init_pid_ns 1
>> │
>> ┌────────────┐
>> ns1 ns2
>> │ │
>> 1550 18060
>> │
>> │
>> ns3
>> │
>> 18102
>> │
>> ┌──────────┐
>> ns4 ns5
>> │ │
>> 1534 1600
>>
>> Every pid printed in pidns_hierarchy
>> is the init pid of that pid ns level.
>>
>> Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
>> ---
>> v8: fix some improper comments
>> use max() from kernel.h
>> v7: change stype to be consistent with current interface like
>> <init_PID> <parent_of_init_PID> <relative PID level>
>> remove EXPERT dependent in Kconfig
>> v6: fix a get_pid leak and do some cleanups;
>> v5: collect pid by find_ge_pid;
>> use local list inside nslist_proc_show;
>> use get_pid, remove mutex lock.
>> v4: simplify pid collection and some performance optimizamtion
>> fix another race issue.
>> v3: fix a race issue and memory leak issue
>> v2: use a procfs text file instead of dirs under /proc
>>
>
> Hi,
>
> Any comments?
FWIW, Acked-by: Richard Weinberer <richard@nod.at>
The more challenging question is who will pickup this series?
Eric? Andrew?
Thanks,
//richard
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/containers
next prev parent reply other threads:[~2014-11-20 21:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-18 9:30 [PATCH v8 0/2] ns, procfs: pid conversion between ns and showing pidns hierarchy Chen Hanxiao
[not found] ` <1416303013-13762-1-git-send-email-chenhanxiao-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2014-11-18 9:30 ` [PATCH v8 1/2] procfs: show hierarchy of pid namespace Chen Hanxiao
[not found] ` <1416303013-13762-2-git-send-email-chenhanxiao-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2014-11-20 9:57 ` Chen, Hanxiao
[not found] ` <5871495633F38949900D2BF2DC04883E73748A47-ZEd+hNNJ6a6dJ4BS92+ASzz3u5zwRJJDAzI0kPv9QBlmR6Xm/wNWPw@public.gmane.org>
2014-11-20 21:29 ` Richard Weinberger [this message]
[not found] ` <546E5D46.4070805-/L3Ra7n9ekc@public.gmane.org>
2014-11-20 22:21 ` Andrew Morton
[not found] ` <20141120142112.74b490298d3360e53dc3169a-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2014-11-24 9:47 ` Chen, Hanxiao
2014-11-18 9:30 ` [PATCH v8 2/2] /proc/PID/status: show all sets of pid according to ns Chen Hanxiao
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=546E5D46.4070805@nod.at \
--to=richard-/l3ra7n9ekc@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=chenhanxiao-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mguzik-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=oleg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=serge.hallyn-GeWIH/nMZzLQT0dZR+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