Commit 5d68cc95 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar

sched/debug: Ignore TASK_IDLE for SysRq-W

Markus reported that tasks in TASK_IDLE state are reported by SysRq-W,
which results in undesirable clutter.
Reported-by: default avatarMarkus Trippelsdorf <>
Signed-off-by: default avatarPeter Zijlstra (Intel) <>
Cc: Linus Torvalds <>
Cc: Peter Zijlstra <>
Cc: Thomas Gleixner <>
Signed-off-by: default avatarIngo Molnar <>
parent 06eb6184
......@@ -5166,6 +5166,28 @@ void sched_show_task(struct task_struct *p)
static inline bool
state_filter_match(unsigned long state_filter, struct task_struct *p)
/* no filter, everything matches */
if (!state_filter)
return true;
/* filter, but doesn't match */
if (!(p->state & state_filter))
return false;
* When looking for TASK_UNINTERRUPTIBLE skip TASK_IDLE (allows
if (state_filter == TASK_UNINTERRUPTIBLE && p->state == TASK_IDLE)
return false;
return true;
void show_state_filter(unsigned long state_filter)
struct task_struct *g, *p;
......@@ -5188,7 +5210,7 @@ void show_state_filter(unsigned long state_filter)
if (!state_filter || (p->state & state_filter))
if (state_filter_match(state_filter, p))
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