From: Erich Focht <focht@ess.nec.de>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] scheduler: migration_task deadlock (resend)
Date: Wed, 6 Mar 2002 11:22:58 +0100 (MET) [thread overview]
Message-ID: <Pine.LNX.4.21.0203061120180.2743-100000@sx6.ess.nec.de> (raw)
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);
}
reply other threads:[~2002-03-06 10:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.21.0203061120180.2743-100000@sx6.ess.nec.de \
--to=focht@ess.nec.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).