[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4ED8E296.3070005@parallels.com>
Date: Fri, 02 Dec 2011 18:37:10 +0400
From: Pavel Emelyanov <xemul@...allels.com>
To: Pedro Alves <pedro@...esourcery.com>
CC: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Cyrill Gorcunov <gorcunov@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Tejun Heo <tj@...nel.org>, Andrew Vagin <avagin@...nvz.org>,
Serge Hallyn <serge.hallyn@...onical.com>,
Vasiliy Kulikov <segoon@...nwall.com>
Subject: Re: [rfc 2/3] fs, proc: Introduce the Children: line in /proc/<pid>/status
On 12/02/2011 06:25 PM, Pedro Alves wrote:
> On Friday 02 December 2011 14:17:08, Pavel Emelyanov wrote:
>
>> O_O OK, I was wrong, they do live there. But I consider this as bug.
>
> You can't change that. It'd break current gdb at least.
OMG!
>> I.e. each task will be shown multiple times, which is not very fun, but memory exhaustive from my POV.
>
> Now that is a good argument against hard linking. But not if you make
> the entries under children/ symlinks. Then find doesn't recurse. And
> then
>
> $ find -L /proc/PID/
>
> does recurse and give you the whole tree. Which I'd say is
> actually useful...
It is useful, but the /proc/pid/children file solves the same problem in a much
more simple way. The memory usage by proc (one file vs one dir and a set of files)
is less and time to lookup a child is also less (read + lookup vs readdir + lookup
(symlink itself) + lookup (symlink resolve)).
Yes, it doesn't allow you to have fun with find, but frankly, do you really need
this? Even if we're talking about gdb -- reading /proc/pid/children is not harder
and not easier than readdir-ing it.
IOW - what's the real benefit of a directory with symlinks against a file except
for a fun?
Thanks,
Pavel
--
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