From: Robert Love <rml@tech9.net>
To: alan@lxorguk.ukuu.org.uk
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] 2.4-ac: more yield abstractions
Date: 07 May 2002 10:53:05 -0700 [thread overview]
Message-ID: <1020793986.800.21.camel@bigsur> (raw)
[-- Attachment #1: Type: text/plain, Size: 273 bytes --]
Alan,
The attached patch should replace the remaining occurrences of
current->policy |= SCHED_YIELD;
schedule();
with
yield();
I missed this previously because they are in arch-dependent non-x86
code. Patch is against 2.4.19-pre7-ac4, please apply.
Robert Love
[-- Attachment #2: sched-yield-rml-2.4.19-pre7-ac4-1.patch --]
[-- Type: text/x-patch, Size: 4181 bytes --]
diff -urN linux-2.4.19-pre7-ac4/arch/alpha/mm/fault.c linux/arch/alpha/mm/fault.c
--- linux-2.4.19-pre7-ac4/arch/alpha/mm/fault.c Mon Apr 29 12:34:59 2002
+++ linux/arch/alpha/mm/fault.c Mon Apr 29 12:40:04 2002
@@ -196,8 +196,7 @@
*/
out_of_memory:
if (current->pid == 1) {
- current->policy |= SCHED_YIELD;
- schedule();
+ yield();
down_read(&mm->mmap_sem);
goto survive;
}
diff -urN linux-2.4.19-pre7-ac4/arch/arm/mm/fault-common.c linux/arch/arm/mm/fault-common.c
--- linux-2.4.19-pre7-ac4/arch/arm/mm/fault-common.c Mon Apr 29 12:35:15 2002
+++ linux/arch/arm/mm/fault-common.c Mon Apr 29 12:40:18 2002
@@ -225,8 +225,7 @@
* If we are out of memory for pid1,
* sleep for a while and retry
*/
- tsk->policy |= SCHED_YIELD;
- schedule();
+ yield();
goto survive;
check_stack:
diff -urN linux-2.4.19-pre7-ac4/arch/ia64/mm/fault.c linux/arch/ia64/mm/fault.c
--- linux-2.4.19-pre7-ac4/arch/ia64/mm/fault.c Mon Apr 29 12:35:19 2002
+++ linux/arch/ia64/mm/fault.c Mon Apr 29 12:41:10 2002
@@ -196,8 +196,7 @@
out_of_memory:
up_read(&mm->mmap_sem);
if (current->pid == 1) {
- current->policy |= SCHED_YIELD;
- schedule();
+ yield();
down_read(&mm->mmap_sem);
goto survive;
}
diff -urN linux-2.4.19-pre7-ac4/arch/m68k/mm/fault.c linux/arch/m68k/mm/fault.c
--- linux-2.4.19-pre7-ac4/arch/m68k/mm/fault.c Mon Apr 29 12:35:12 2002
+++ linux/arch/m68k/mm/fault.c Mon Apr 29 12:40:48 2002
@@ -188,8 +188,7 @@
out_of_memory:
up_read(&mm->mmap_sem);
if (current->pid == 1) {
- current->policy |= SCHED_YIELD;
- schedule();
+ yield();
down_read(&mm->mmap_sem);
goto survive;
}
diff -urN linux-2.4.19-pre7-ac4/arch/mips/mm/fault.c linux/arch/mips/mm/fault.c
--- linux-2.4.19-pre7-ac4/arch/mips/mm/fault.c Mon Apr 29 12:35:02 2002
+++ linux/arch/mips/mm/fault.c Mon Apr 29 12:40:26 2002
@@ -211,8 +211,7 @@
out_of_memory:
up_read(&mm->mmap_sem);
if (tsk->pid == 1) {
- tsk->policy |= SCHED_YIELD;
- schedule();
+ yield();
down_read(&mm->mmap_sem);
goto survive;
}
diff -urN linux-2.4.19-pre7-ac4/arch/mips64/mm/fault.c linux/arch/mips64/mm/fault.c
--- linux-2.4.19-pre7-ac4/arch/mips64/mm/fault.c Mon Apr 29 12:35:22 2002
+++ linux/arch/mips64/mm/fault.c Mon Apr 29 12:41:45 2002
@@ -240,8 +240,7 @@
out_of_memory:
up_read(&mm->mmap_sem);
if (tsk->pid == 1) {
- tsk->policy |= SCHED_YIELD;
- schedule();
+ yield();
down_read(&mm->mmap_sem);
goto survive;
}
diff -urN linux-2.4.19-pre7-ac4/arch/ppc/mm/fault.c linux/arch/ppc/mm/fault.c
--- linux-2.4.19-pre7-ac4/arch/ppc/mm/fault.c Mon Apr 29 12:35:07 2002
+++ linux/arch/ppc/mm/fault.c Mon Apr 29 12:40:37 2002
@@ -197,8 +197,7 @@
out_of_memory:
up_read(&mm->mmap_sem);
if (current->pid == 1) {
- current->policy |= SCHED_YIELD;
- schedule();
+ yield();
down_read(&mm->mmap_sem);
goto survive;
}
diff -urN linux-2.4.19-pre7-ac4/arch/s390/mm/fault.c linux/arch/s390/mm/fault.c
--- linux-2.4.19-pre7-ac4/arch/s390/mm/fault.c Mon Apr 29 12:35:23 2002
+++ linux/arch/s390/mm/fault.c Mon Apr 29 12:41:54 2002
@@ -290,8 +290,7 @@
out_of_memory:
up_read(&mm->mmap_sem);
if (tsk->pid == 1) {
- tsk->policy |= SCHED_YIELD;
- schedule();
+ yield();
down_read(&mm->mmap_sem);
goto survive;
}
diff -urN linux-2.4.19-pre7-ac4/arch/s390x/mm/fault.c linux/arch/s390x/mm/fault.c
--- linux-2.4.19-pre7-ac4/arch/s390x/mm/fault.c Mon Apr 29 12:35:24 2002
+++ linux/arch/s390x/mm/fault.c Mon Apr 29 12:42:06 2002
@@ -290,8 +290,7 @@
out_of_memory:
up_read(&mm->mmap_sem);
if (tsk->pid == 1) {
- tsk->policy |= SCHED_YIELD;
- schedule();
+ yield();
down_read(&mm->mmap_sem);
goto survive;
}
diff -urN linux-2.4.19-pre7-ac4/arch/sh/mm/fault.c linux/arch/sh/mm/fault.c
--- linux-2.4.19-pre7-ac4/arch/sh/mm/fault.c Mon Apr 29 12:35:18 2002
+++ linux/arch/sh/mm/fault.c Mon Apr 29 12:41:01 2002
@@ -207,8 +207,7 @@
out_of_memory:
up_read(&mm->mmap_sem);
if (current->pid == 1) {
- current->policy |= SCHED_YIELD;
- schedule();
+ yield();
down_read(&mm->mmap_sem);
goto survive;
}
reply other threads:[~2002-05-07 17:53 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=1020793986.800.21.camel@bigsur \
--to=rml@tech9.net \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
/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