* [patch 3/4] proc: Introduce the Children: line in /proc/<pid>/status
@ 2011-08-07 21:20 Cyrill Gorcunov
2011-08-08 14:40 ` Tejun Heo
0 siblings, 1 reply; 3+ messages in thread
From: Cyrill Gorcunov @ 2011-08-07 21:20 UTC (permalink / raw)
To: Nathan Lynch, Oren Laadan, Daniel Lezcano, Serge Hallyn,
Tejun Heo, Andrew Morton
Cc: Glauber Costa, containers, linux-kernel, Pavel Emelyanov,
Serge Hallyn, Cyrill Gorcunov
From: Pavel Emelyanov <xemul@parallels.com>
Although we can get the pids of some task's issue, this is just
more convenient to have them this way.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
fs/proc/array.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
Index: linux-2.6.git/fs/proc/array.c
===================================================================
--- linux-2.6.git.orig/fs/proc/array.c
+++ linux-2.6.git/fs/proc/array.c
@@ -158,6 +158,18 @@ static inline const char *get_task_state
return *p;
}
+static void task_children(struct seq_file *m, struct task_struct *p, struct pid_namespace *ns)
+{
+ struct task_struct *c;
+
+ seq_printf(m, "Children:");
+ read_lock(&tasklist_lock);
+ list_for_each_entry(c, &p->children, sibling)
+ seq_printf(m, " %d", pid_nr_ns(task_pid(c), ns));
+ read_unlock(&tasklist_lock);
+ seq_putc(m, '\n');
+}
+
static inline void task_state(struct seq_file *m, struct pid_namespace *ns,
struct pid *pid, struct task_struct *p)
{
@@ -192,6 +204,8 @@ static inline void task_state(struct seq
cred->uid, cred->euid, cred->suid, cred->fsuid,
cred->gid, cred->egid, cred->sgid, cred->fsgid);
+ task_children(m, p, ns);
+
task_lock(p);
if (p->files)
fdt = files_fdtable(p->files);
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [patch 3/4] proc: Introduce the Children: line in /proc/<pid>/status
2011-08-07 21:20 [patch 3/4] proc: Introduce the Children: line in /proc/<pid>/status Cyrill Gorcunov
@ 2011-08-08 14:40 ` Tejun Heo
2011-08-08 14:46 ` Pavel Emelyanov
0 siblings, 1 reply; 3+ messages in thread
From: Tejun Heo @ 2011-08-08 14:40 UTC (permalink / raw)
To: Cyrill Gorcunov
Cc: Nathan Lynch, Oren Laadan, Daniel Lezcano, Serge Hallyn,
Andrew Morton, Glauber Costa, containers, linux-kernel,
Pavel Emelyanov, Serge Hallyn
On Mon, Aug 08, 2011 at 01:20:31AM +0400, Cyrill Gorcunov wrote:
> From: Pavel Emelyanov <xemul@parallels.com>
>
> Although we can get the pids of some task's issue, this is just
> more convenient to have them this way.
>
> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
> Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
I'm not necessarily against this one but don't really see much point
either. Can we delay this for now?
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 3/4] proc: Introduce the Children: line in /proc/<pid>/status
2011-08-08 14:40 ` Tejun Heo
@ 2011-08-08 14:46 ` Pavel Emelyanov
0 siblings, 0 replies; 3+ messages in thread
From: Pavel Emelyanov @ 2011-08-08 14:46 UTC (permalink / raw)
To: Tejun Heo
Cc: Cyrill Gorcunov, Nathan Lynch, Oren Laadan, Daniel Lezcano,
Serge Hallyn, Andrew Morton, Glauber Costa,
containers@lists.osdl.org, linux-kernel@vger.kernel.org,
Serge Hallyn
On 08/08/2011 06:40 PM, Tejun Heo wrote:
> On Mon, Aug 08, 2011 at 01:20:31AM +0400, Cyrill Gorcunov wrote:
>> From: Pavel Emelyanov <xemul@parallels.com>
>>
>> Although we can get the pids of some task's issue, this is just
>> more convenient to have them this way.
>>
>> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
>> Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
>> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
>
> I'm not necessarily against this one but don't really see much point
> either. Can we delay this for now?
Sure we can. As I stated previously this one just makes our live easier, but
we can live without one.
> Thanks.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-08-08 14:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-07 21:20 [patch 3/4] proc: Introduce the Children: line in /proc/<pid>/status Cyrill Gorcunov
2011-08-08 14:40 ` Tejun Heo
2011-08-08 14:46 ` Pavel Emelyanov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox