From: Jun Sun <jsun@mvista.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
ralf@oss.sgi.com, linux-mips@oss.sgi.com,
linuxppc-dev@lists.linuxppc.org
Subject: [PATCH] smp sched typo
Date: Wed, 15 May 2002 13:17:36 -0700 [thread overview]
Message-ID: <3CE2C260.5070307@mvista.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 343 bytes --]
Linus,
I found this bug in 2.4 kernel. I have verified that the bug exists on MIPS
SMP and PPC SMP, but not on i386 SMP. See the detailed explanation inside the
patch.
2.5 sched.c has been re-written quite a bit and does not have this problem.
http://linux.junsun.net/patches/generic/submitted/020515-2.4.18-smp-sched-typo.patch
Jun
[-- Attachment #2: 020515-2.4.18-smp-sched-typo.patch --]
[-- Type: text/plain, Size: 757 bytes --]
Gcc will optimizie out the whole 'if' branch on platforms where
cycles_t is not unsigned long long (such as MIPS, PPC).
The symptom for this bug is not fatal - perhaps that is ther reason
why nobody has found it so far. Higher priority process will be delayed
to start its execution. One of my tests shows on a heavy-loaded system
the delay is about 5 to 6 jiffies.
Jun, 020515
diff -Nru link/kernel/sched.c.orig link/kernel/sched.c
--- link/kernel/sched.c.orig Fri Dec 21 09:42:04 2001
+++ link/kernel/sched.c Wed May 15 12:38:12 2002
@@ -282,7 +282,7 @@
target_tsk = tsk;
}
} else {
- if (oldest_idle == -1ULL) {
+ if (oldest_idle == (cycles_t)-1) {
int prio = preemption_goodness(tsk, p, cpu);
if (prio > max_prio) {
reply other threads:[~2002-05-15 20:19 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=3CE2C260.5070307@mvista.com \
--to=jsun@mvista.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-mips@oss.sgi.com \
--cc=linuxppc-dev@lists.linuxppc.org \
--cc=ralf@oss.sgi.com \
--cc=torvalds@transmeta.com \
/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