* [patch] fix sched_debug livelock
@ 2008-04-29 12:42 Mike Galbraith
2008-04-29 13:08 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Mike Galbraith @ 2008-04-29 12:42 UTC (permalink / raw)
To: LKML; +Cc: Ingo Molnar, Peter Zijlstra
(resending, didn't cc lkml)
Revert debugging commit 7ba2e74ab5a0518bc953042952dd165724bc70c9. print_cfs_rq_tasks()
can induce live-lock if a task is dequeued during list traversal.
Signed-off-by: Mike Galbraith <efault@gmx.de>
index 89fa32b..d72e8b4 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -1611,30 +1611,6 @@ static const struct sched_class fair_sched_class = {
};
#ifdef CONFIG_SCHED_DEBUG
-static void
-print_cfs_rq_tasks(struct seq_file *m, struct cfs_rq *cfs_rq, int depth)
-{
- struct sched_entity *se;
-
- if (!cfs_rq)
- return;
-
- list_for_each_entry_rcu(se, &cfs_rq->tasks, group_node) {
- int i;
-
- for (i = depth; i; i--)
- seq_puts(m, " ");
-
- seq_printf(m, "%lu %s %lu\n",
- se->load.weight,
- entity_is_task(se) ? "T" : "G",
- calc_delta_weight(SCHED_LOAD_SCALE, se)
- );
- if (!entity_is_task(se))
- print_cfs_rq_tasks(m, group_cfs_rq(se), depth + 1);
- }
-}
-
static void print_cfs_stats(struct seq_file *m, int cpu)
{
struct cfs_rq *cfs_rq;
@@ -1642,9 +1618,6 @@ static void print_cfs_stats(struct seq_file *m, int cpu)
rcu_read_lock();
for_each_leaf_cfs_rq(cpu_rq(cpu), cfs_rq)
print_cfs_rq(m, cpu, cfs_rq);
-
- seq_printf(m, "\nWeight tree:\n");
- print_cfs_rq_tasks(m, &cpu_rq(cpu)->cfs, 1);
rcu_read_unlock();
}
#endif
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] fix sched_debug livelock
2008-04-29 12:42 [patch] fix sched_debug livelock Mike Galbraith
@ 2008-04-29 13:08 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-04-29 13:08 UTC (permalink / raw)
To: Mike Galbraith; +Cc: LKML, Peter Zijlstra
* Mike Galbraith <efault@gmx.de> wrote:
> (resending, didn't cc lkml)
>
> Revert debugging commit 7ba2e74ab5a0518bc953042952dd165724bc70c9.
> print_cfs_rq_tasks() can induce live-lock if a task is dequeued during
> list traversal.
applied, thanks Mike - good catch!
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-29 13:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-29 12:42 [patch] fix sched_debug livelock Mike Galbraith
2008-04-29 13:08 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox