Commit 510f5acc authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Ingo Molnar

sched: Don't use tasklist_lock for debug prints

Avoid taking locks from debug prints, this avoids latencies on -rt,
and improves reliability of the debug code.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 1c83437e
...@@ -6021,7 +6021,7 @@ void show_state_filter(unsigned long state_filter) ...@@ -6021,7 +6021,7 @@ void show_state_filter(unsigned long state_filter)
printk(KERN_INFO printk(KERN_INFO
" task PC stack pid father\n"); " task PC stack pid father\n");
#endif #endif
read_lock(&tasklist_lock); rcu_read_lock();
do_each_thread(g, p) { do_each_thread(g, p) {
/* /*
* reset the NMI-timeout, listing all files on a slow * reset the NMI-timeout, listing all files on a slow
...@@ -6037,7 +6037,7 @@ void show_state_filter(unsigned long state_filter) ...@@ -6037,7 +6037,7 @@ void show_state_filter(unsigned long state_filter)
#ifdef CONFIG_SCHED_DEBUG #ifdef CONFIG_SCHED_DEBUG
sysrq_sched_debug_show(); sysrq_sched_debug_show();
#endif #endif
read_unlock(&tasklist_lock); rcu_read_unlock();
/* /*
* Only show locks if all tasks are dumped: * Only show locks if all tasks are dumped:
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment