aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2013-09-09 07:01:41 -0400
committerIngo Molnar <mingo@kernel.org>2013-09-12 13:14:16 -0400
commitfc840914e9b07ab4685c195e1e54e58de4f84c03 (patch)
tree0e2e5e65ef9569fa2fdae90eecd6081ad4b10e1d
parent6c9a27f5da9609fca46cb2b183724531b48f71ad (diff)
sched/debug: Take PID namespace into account
Emmanuel reported that /proc/sched_debug didn't report the right PIDs when using namespaces, cure this. Reported-by: Emmanuel Deloget <emmanuel.deloget@efixo.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20130909110141.GM31370@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--kernel/sched/debug.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index e076bddd4c66..196559994f7c 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -124,7 +124,7 @@ print_task(struct seq_file *m, struct rq *rq, struct task_struct *p)
124 SEQ_printf(m, " "); 124 SEQ_printf(m, " ");
125 125
126 SEQ_printf(m, "%15s %5d %9Ld.%06ld %9Ld %5d ", 126 SEQ_printf(m, "%15s %5d %9Ld.%06ld %9Ld %5d ",
127 p->comm, p->pid, 127 p->comm, task_pid_nr(p),
128 SPLIT_NS(p->se.vruntime), 128 SPLIT_NS(p->se.vruntime),
129 (long long)(p->nvcsw + p->nivcsw), 129 (long long)(p->nvcsw + p->nivcsw),
130 p->prio); 130 p->prio);
@@ -289,7 +289,7 @@ do { \
289 P(nr_load_updates); 289 P(nr_load_updates);
290 P(nr_uninterruptible); 290 P(nr_uninterruptible);
291 PN(next_balance); 291 PN(next_balance);
292 P(curr->pid); 292 SEQ_printf(m, " .%-30s: %ld\n", "curr->pid", (long)(task_pid_nr(rq->curr)));
293 PN(clock); 293 PN(clock);
294 P(cpu_load[0]); 294 P(cpu_load[0]);
295 P(cpu_load[1]); 295 P(cpu_load[1]);
@@ -492,7 +492,7 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m)
492{ 492{
493 unsigned long nr_switches; 493 unsigned long nr_switches;
494 494
495 SEQ_printf(m, "%s (%d, #threads: %d)\n", p->comm, p->pid, 495 SEQ_printf(m, "%s (%d, #threads: %d)\n", p->comm, task_pid_nr(p),
496 get_nr_threads(p)); 496 get_nr_threads(p));
497 SEQ_printf(m, 497 SEQ_printf(m,
498 "---------------------------------------------------------" 498 "---------------------------------------------------------"