[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-aa47b7e0f89b9998dad4d1667447e8cb7703ff4e@git.kernel.org>
Date: Thu, 7 May 2009 07:39:44 GMT
From: tip-bot for David Rientjes <rientjes@...gle.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
a.p.zijlstra@...llo.nl, sfr@...b.auug.org.au, tglx@...utronix.de,
rientjes@...gle.com, mingo@...e.hu
Subject: [tip:sched/core] sched: emit thread info flags with stack trace
Commit-ID: aa47b7e0f89b9998dad4d1667447e8cb7703ff4e
Gitweb: http://git.kernel.org/tip/aa47b7e0f89b9998dad4d1667447e8cb7703ff4e
Author: David Rientjes <rientjes@...gle.com>
AuthorDate: Mon, 4 May 2009 01:38:05 -0700
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Thu, 7 May 2009 09:36:28 +0200
sched: emit thread info flags with stack trace
When a thread is oom killed and fails to exit, it's helpful to know which
threads have access to memory reserves if the machine livelocks. This is
done by testing for the TIF_MEMDIE thread info flag and should be
displayed alongside stack traces to identify tasks that have access to
such reserves but are still stuck allocating pages, for instance.
It would probably be helpful in other cases as well, so all thread info
flags are emitted when showing a task.
( v2: fix warning reported by Stephen Rothwell )
[ Impact: extend debug printout info ]
Signed-off-by: David Rientjes <rientjes@...gle.com>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>
LKML-Reference: <alpine.DEB.2.00.0905040136390.15831@...no.kir.corp.google.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
kernel/sched.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/sched.c b/kernel/sched.c
index 2a43a58..5aa63f5 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6610,8 +6610,9 @@ void sched_show_task(struct task_struct *p)
#ifdef CONFIG_DEBUG_STACK_USAGE
free = stack_not_used(p);
#endif
- printk(KERN_CONT "%5lu %5d %6d\n", free,
- task_pid_nr(p), task_pid_nr(p->real_parent));
+ printk(KERN_CONT "%5lu %5d %6d 0x%08lx\n", free,
+ task_pid_nr(p), task_pid_nr(p->real_parent),
+ (unsigned long)task_thread_info(p)->flags);
show_stack(p, NULL);
}
--
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