Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1488708 > unrolled thread

[PATCH] sched/debug: check p->se.on_rq for 'runnable tasks'

Started byZhu Yanhai <zhu.yanhai@foxmail.com>
First post2016-09-22 12:00 +0200
Last post2016-09-23 05:20 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] sched/debug: check p->se.on_rq for 'runnable tasks' Zhu Yanhai <zhu.yanhai@foxmail.com> - 2016-09-22 12:00 +0200
    Re: [PATCH] sched/debug: check p->se.on_rq for 'runnable tasks' Peter Zijlstra <peterz@infradead.org> - 2016-09-22 12:10 +0200
      Re: [PATCH] sched/debug: check p->se.on_rq for 'runnable tasks' Zhu Yanhai <zhu.yanhai@gmail.com> - 2016-09-23 05:20 +0200

#1488708 — [PATCH] sched/debug: check p->se.on_rq for 'runnable tasks'

FromZhu Yanhai <zhu.yanhai@foxmail.com>
Date2016-09-22 12:00 +0200
Subject[PATCH] sched/debug: check p->se.on_rq for 'runnable tasks'
Message-ID<sk8Xn-4DU-1@gated-at.bofh.it>
From: Zhu Yanhai <gaoyang.zyh@taobao.com>

I can't see why the check was removed by commit b32e86b4. Since it was not
relevant to the subject of the commit, I guess it was just a plain typo.

Signed-off-by: Zhu Yanhai <gaoyang.zyh@taobao.com>
---
 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 2a0a999..ee1ca70 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -456,7 +456,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->se.on_rq || task_cpu(p) != rq_cpu)
 			continue;
 
 		print_task(m, rq, p);
-- 
2.5.5

[toc] | [next] | [standalone]


#1488718

FromPeter Zijlstra <peterz@infradead.org>
Date2016-09-22 12:10 +0200
Message-ID<sk973-4Wz-9@gated-at.bofh.it>
In reply to#1488708
On Thu, Sep 22, 2016 at 05:50:53PM +0800, Zhu Yanhai wrote:
> From: Zhu Yanhai <gaoyang.zyh@taobao.com>
> 
> I can't see why the check was removed by commit b32e86b4. Since it was not
> relevant to the subject of the commit, I guess it was just a plain typo.

No, it was very much on purpose. It shows all tasks now, which is much
more useful if you want to generate pretty pictures from the output.

Its a bit hard to make pretty pictures when tasks disappear all the
time.

[toc] | [prev] | [next] | [standalone]


#1489724

FromZhu Yanhai <zhu.yanhai@gmail.com>
Date2016-09-23 05:20 +0200
Message-ID<skpbP-6H2-9@gated-at.bofh.it>
In reply to#1488718
2016-09-22 18:08 GMT+08:00 Peter Zijlstra <peterz@infradead.org>:
> On Thu, Sep 22, 2016 at 05:50:53PM +0800, Zhu Yanhai wrote:
>> From: Zhu Yanhai <gaoyang.zyh@taobao.com>
>>
>> I can't see why the check was removed by commit b32e86b4. Since it was not
>> relevant to the subject of the commit, I guess it was just a plain typo.
>
> No, it was very much on purpose. It shows all tasks now, which is much
> more useful if you want to generate pretty pictures from the output.
>
> Its a bit hard to make pretty pictures when tasks disappear all the
> time.

I see. Thanks for your quick reply!

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web