Blob Blame History Raw
From: Mike Galbraith <bitbucket@online.de>
Date: Tue, 3 Jun 2014 14:16:09 +0200
Subject: [PATCH] sched: Fix up /proc/sched_debug to print only runnable tasks
 again

Patch-mainline: never, SUSE specific (submitted, but ignored)
References: none, should be posted upstream

Commit b32e86b430 dropped p->on_rq check, leading to printing tasks which
used to live on runqueues, which is very noisy and highly annoying.

Signed-off-by: Mike Galbraith <mgalbraith@suse.de>
Signed-off-by: Mel Gorman <mgorman@suse.de>
---
 kernel/sched/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index f7e4579e746c..c1791307b9be 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -472,7 +472,7 @@ static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu)
 
 	rcu_read_lock();
 	for_each_process_thread(g, p) {
-		if (task_cpu(p) != rq_cpu)
+		if (!p->on_rq || task_cpu(p) != rq_cpu)
 			continue;
 
 		print_task(m, rq, p);