From: Duncan Sands <baldrick@wanadoo.fr>
To: Andi Kleen <ak@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Use of sti in entry.S question
Date: Thu, 22 May 2003 22:48:44 +0200 [thread overview]
Message-ID: <200305222248.44459.baldrick@wanadoo.fr> (raw)
In-Reply-To: <p73ptmb8jwu.fsf@oldwotan.suse.de>
...
> > Is this a mistake or an optimization? Elsewhere in entry.S, interrupts
> > are turned on before calling schedule:
>
> It's a mistake, but a harmless one. The scheduler turns off interrupts
> soon itself and the instructions it executes before that don't care.
> The only reason it's not recommended to call schedule with interrupts
> off is that the scheduler will turn them on again, usually breaking
> your critical section. In this case it's ok because the next
> instrution is a cli again.
Do you think it's worth pushing this fix?
diff -Nru a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S
--- a/arch/i386/kernel/entry.S Thu May 22 22:45:50 2003
+++ b/arch/i386/kernel/entry.S Thu May 22 22:45:50 2003
@@ -306,6 +306,7 @@
testb $_TIF_NEED_RESCHED, %cl
jz work_notifysig
work_resched:
+ sti
call schedule
cli # make sure we don't miss an interrupt
# setting need_resched or sigpending
next prev parent reply other threads:[~2003-05-22 20:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200305220939.13619.baldrick@wanadoo.fr.suse.lists.linux.kernel>
2003-05-22 8:28 ` Andi Kleen
2003-05-22 20:48 ` Duncan Sands [this message]
2003-05-22 7:39 Duncan Sands
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=200305222248.44459.baldrick@wanadoo.fr \
--to=baldrick@wanadoo.fr \
--cc=ak@suse.de \
--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
Powered by JetHome