From: Takeharu KATO <kato.takeharu@jp•fujitsu.com>
To: Takeharu KATO <takeharu1219@ybb•ne.jp>
Cc: linuxppc-dev@ozlabs•org
Subject: Re: boot time scheduling hile atomic
Date: Fri, 11 Mar 2005 15:19:41 +0900 [thread overview]
Message-ID: <4231387D.6030204@jp.fujitsu.com> (raw)
In-Reply-To: <423073A9.70404@ybb.ne.jp>
Hi Joerg:
First of all, I am sorry to making mistake on my stack analysis.
After all, I found what is wrong.
The syscall_exit_work is called(jumped) by fork, strictly speaking,
this is caused by kernel_thead for init process.
At this point, kernel set a need_resched flag in thread_info struct
(flags member).
So, the system executes syscall_exit_work when
the swapper thread exited from syscall.
However, the syscall_exit_work routine does not check
preempt counts when it calls schedule function.
FYI, I post the patch which fix this problem.
I've confirmed the problem has been removed by this patch,
but I can not figure out whether it is truely
correct or not.
Please review this.
Signed-off-by: Takeharu KATO <kato.takeharu@jp•fujitsu.com>
--- linux-2.6.11/arch/ppc/kernel/entry.S 2005-03-09 12:57:32.000000000 +0900
+++ linux-2.6.11-wdt/arch/ppc/kernel/entry.S 2005-03-11 14:39:16.345490784 +0900
@@ -314,10 +314,16 @@ syscall_exit_work:
SYNC
MTMSRD(r10) /* disable interrupts again */
rlwinm r12,r1,0,0,18 /* current_thread_info() */
- lwz r9,TI_FLAGS(r12)
5:
+#ifdef CONFIG_PREEMPT
+ lwz r0,TI_PREEMPT(r12)
+ cmpwi 0,r0,0 /* if non-zero, we can not reschedule here */
+ bne 6f
+#endif
+ lwz r9,TI_FLAGS(r12)
andi. r0,r9,_TIF_NEED_RESCHED
bne 1f
+6:
lwz r5,_MSR(r1)
andi. r5,r5,MSR_PR
beq syscall_exit_cont
--
Takeharu KATO
Fujitsu Limited
Email:kato.takeharu at jp.fujitsu.com
next prev parent reply other threads:[~2005-03-11 6:21 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-03 12:44 GCC4 fun Joerg Dorchain
2005-03-03 13:13 ` Marc Leeman
2005-03-03 13:46 ` evilninja
2005-03-03 14:18 ` boot time scheduling hile atomic (was: GCC4 fun.) Joerg Dorchain
2005-03-04 7:57 ` Joerg Dorchain
2005-03-04 15:06 ` boot time scheduling hile atomic _evil
2005-03-10 4:51 ` Takeharu KATO
2005-03-10 7:28 ` Joerg Dorchain
2005-03-10 16:19 ` Takeharu KATO
2005-03-11 6:19 ` Takeharu KATO [this message]
2005-03-16 0:18 ` Benjamin Herrenschmidt
2005-03-16 5:24 ` Takeharu KATO
2005-03-16 5:49 ` Takeharu KATO
2005-03-16 6:28 ` Benjamin Herrenschmidt
2005-03-16 14:07 ` Takeharu KATO
2005-03-16 22:28 ` Benjamin Herrenschmidt
2005-03-17 0:46 ` Takeharu KATO
2005-03-11 22:21 ` boot time scheduling while atomic Takeharu KATO
-- strict thread matches above, loose matches on Subject: below --
2005-06-10 14:23 boot time scheduling hile atomic Rune Torgersen
2005-06-14 12:41 ` Takeharu KATO
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=4231387D.6030204@jp.fujitsu.com \
--to=kato.takeharu@jp$(echo .)fujitsu.com \
--cc=linuxppc-dev@ozlabs$(echo .)org \
--cc=takeharu1219@ybb$(echo .)ne.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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