mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: marcelo@conectiva.com.br, linux-kernel@vger.kernel.org
Subject: [PATCH] fix bug in yield()
Date: Mon, 19 Aug 2002 11:56:04 +1000 (EST)	[thread overview]
Message-ID: <15712.20532.996267.734044@argo.ozlabs.ibm.com> (raw)

This patch makes yield() actually call schedule.

Without this patch, 2.4.20-pre3 will hang on boot for me, looping in
spawn_ksoftirqd waiting for ksoftirqd to start and calling yield().
ksoftirqd never gets to run, however, because yield never actually
calls schedule.  (Note that sys_sched_yield as a syscall is OK because
the syscall exit path will check current->need_resched and call
schedule).

Paul.

diff -urN linux-2.4/kernel/sched.c pmac/kernel/sched.c
--- linux-2.4/kernel/sched.c	Wed Aug  7 18:10:01 2002
+++ pmac/kernel/sched.c	Mon Aug 19 10:39:39 2002
@@ -1081,6 +1081,7 @@
 {
 	set_current_state(TASK_RUNNING);
 	sys_sched_yield();
+	schedule();
 }
 
 void __cond_resched(void)


             reply	other threads:[~2002-08-19  1:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-19  1:56 Paul Mackerras [this message]
2002-08-19 11:43 ` Hiroshi Takekawa

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=15712.20532.996267.734044@argo.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    /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

all inboxes | Powered by JetHome®