lkml.org 
[lkml]   [2011]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [rfc 2/3] fs, proc: Introduce the Children: line in /proc/<pid>/status
On 12/02/2011 04:41 PM, Pedro Alves wrote:
> On Friday 02 December 2011 00:40:10, KAMEZAWA Hiroyuki wrote:
>>> What about this one?
>>> ---
>>> fs, proc: Introduce the /proc/<pid>/children entry
>>>
>>> There is no easy way to make a reverse parent->children chain
>>> from the task status, in turn children->parent provided with "PPid"
>>> field.
>>>
>>> So instead of walking over all pids in system to figure out what
>>> children the task have -- we add explicit /proc/<pid>/children entry,
>>> since kernel already knows this kind of information but it was not
>>> yet exported.
>>>
>>> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
>>> Cc: Pavel Emelyanov <xemul@parallels.com>
>>> Cc: Serge Hallyn <serge.hallyn@canonical.com>
>>> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
>>
>> Yes, I like /children file. other points seems to be pointed out by other
>> reviewers.
>
> Any reason this is a file instead of a directory like /proc/PID/task/ ?
>
> $ sudo ls /proc/8167/task/
> 8167 854 855 856 857 858 859
> $ sudo ls /proc/8167/task/855/
> attr clear_refs cpuset exe io loginuid mountinfo oom_adj pagemap sched smaps statm wchan
> auxv cmdline cwd fd latency maps mounts oom_score personality schedstat stack status
> cgroup comm environ fdinfo limits mem numa_maps oom_score_adj root sessionid stat syscall
>
> Much easier to follow the chain from the command line this way.

What do you propose to put into these directories? Another directories named with
children pid-s?


\
 
 \ /
  Last update: 2011-12-02 13:45    [W:0.085 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site