lkml.org 
[lkml]   [2002]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] scheduler: migration_task deadlock (resend)
Hi,

I'm resending this because the deadlock still exists in 2.5.6-pre2.

Regards,
Erich


---------- Resent message ----------
Date: Thu, 28 Feb 2002 18:55:50 +0100 (MET)

Hi,

in the migration scheme included into the 2.5.6-pre1 kernel there is a
potential deadlock (which I encountered several times) in the migration
task. If interrupts are not disabled before aquiring the double rq lock
this task can be interrupted by a scheduler_tick() which will spinwait
forever.

Best regards,
Erich

diff -urN 2.5.6-pre1/kernel/sched.c 2.5.6-pre1-fix/kernel/sched.c
--- 2.5.6-pre1/kernel/sched.c Thu Feb 28 19:10:49 2002
+++ 2.5.6-pre1-fix/kernel/sched.c Thu Feb 28 19:14:29 2002
@@ -1626,9 +1626,11 @@
cpu_src = p->thread_info->cpu;
rq_src = cpu_rq(cpu_src);

+ local_irq_save(flags);
double_rq_lock(rq_src, rq_dest);
if (p->thread_info->cpu != cpu_src) {
double_rq_unlock(rq_src, rq_dest);
+ local_irq_restore(flags);
goto repeat;
}
if (rq_src == rq) {
@@ -1639,6 +1641,7 @@
}
}
double_rq_unlock(rq_src, rq_dest);
+ local_irq_restore(flags);

up(&req->sem);
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:24    [W:0.023 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site