Skip to contentSkip to conversation

sched: Fix up /proc/sched_debug to print only runnable tasks again

PATCH RESEND In review Mike Galbraith 2 participants 2 messages Jun 3, 2014 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 sched: Fix up /proc/sched_debug to print only runnable tasks again

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

---
 kernel/sched/debug.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/debug.c +1 -1
@@ -162,7 +162,7 @@ static void print_rq(struct seq_file *m,
 	read_lock_irqsave(&tasklist_lock, flags);
 
 	do_each_thread(g, p) {
-		if (task_cpu(p) != rq_cpu)
+		if (!p->on_rq || task_cpu(p) != rq_cpu)
 			continue;
 
 		print_task(m, rq, p);
maintainer
#1 lore raw
Quoted 3 lines · Mike Galbraith

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

Yes,.. but also useful for the numa cruft :-(

When printing all we can get placement info for !running tasks.

Not sure what to do here..