[lkml]   [2011]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [rfc 2/3] fs, proc: Introduce the Children: line in /proc/<pid>/status
    On Tue, 29 Nov 2011 23:12:54 +0400
    Cyrill Gorcunov <> wrote:

    > From: Pavel Emelyanov <>
    > 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 "Children" member to
    > /proc/<pid>/status since kernel already knows this kind of information
    > but it was not yet exported.
    > Signed-off-by: Pavel Emelyanov <>
    > Acked-by: Serge Hallyn <>
    > Signed-off-by: Cyrill Gorcunov <>

    I may be too pessimistic but what amount of overhead will this add to
    ps -elf/ top ? Assuming an environment 'ps -elf' is called once per a sec,
    if there are 2000 processes, task_list lock is taken 2000 times by this patch.

    Isn't it better to add /proc/<pid>/children file or dir (as task)?


     \ /
      Last update: 2011-11-30 06:03    [W:0.027 / U:1.684 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site