[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <546E5D46.4070805@nod.at>
Date: Thu, 20 Nov 2014 22:29:42 +0100
From: Richard Weinberger <richard@....at>
To: "Chen, Hanxiao" <chenhanxiao@...fujitsu.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Serge Hallyn <serge.hallyn@...ntu.com>,
Oleg Nesterov <oleg@...hat.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
CC: "containers@...ts.linux-foundation.org"
<containers@...ts.linux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Mateusz Guzik <mguzik@...hat.com>,
David Howells <dhowells@...hat.com>
Subject: Re: [PATCH v8 1/2] procfs: show hierarchy of pid namespace
Am 20.11.2014 um 10:57 schrieb Chen, Hanxiao:
>
>
>> -----Original Message-----
>> From: containers-bounces@...ts.linux-foundation.org
>> [mailto:containers-bounces@...ts.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@...ts.linux-foundation.org; linux-kernel@...r.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@...alhost ~]#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@...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@....at>
The more challenging question is who will pickup this series?
Eric? Andrew?
Thanks,
//richard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists