From: Takeharu KATO <kato.takeharu@jp.fujitsu.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev list <linuxppc-dev@ozlabs.org>
Subject: Re: boot time scheduling hile atomic
Date: Wed, 16 Mar 2005 14:24:41 +0900 [thread overview]
Message-ID: <4237C319.4050109@jp.fujitsu.com> (raw)
In-Reply-To: <1110932285.25201.66.camel@gaston>
Hi Benjamin:
Thank you for your response.
> I think the problem is more why are we calling a syscall while the
> preempt count is up ?
>
Because, start_kernel(line:455) in init/main.c count up this.
-- start_kernel (init/main.c)
451 /*
452 * Disable preemption - early bootup scheduling is extremely
453 * fragile until we cpu_idle() for the first time.
454 */
455 preempt_disable();
456 build_all_zonelists();
-- start_kernel(init/main.c)
Preemption is disabled until it enters the body of idle task from rest_init.
Please see below:
-- rest_init (init/main.c)
379 static void noinline rest_init(void)
380 __releases(kernel_lock)
381 {
382 kernel_thread(init, NULL, CLONE_FS | CLONE_SIGHAND);
383 numa_default_policy();
384 unlock_kernel();
385 preempt_enable_no_resched();
386 cpu_idle();
387 }
--
I think that the kernel assumes that init thread(the kernel thread which become to
init process later) is kicked by idle process(cpu_idle).
But, the kernel invoke a system call trap when it execute kernel_thread call
(at rest_init line:382) on PowerPC.
The preemption count has positive value here.
So, PowerPC linux kernel invoke system call when the preempt count is up.
Regards,
--
Takeharu KATO
Fujitsu Limited
Email:kato.takeharu at jp.fujitsu.com
next prev parent reply other threads:[~2005-03-16 5:25 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
2005-03-16 0:18 ` Benjamin Herrenschmidt
2005-03-16 5:24 ` Takeharu KATO [this message]
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=4237C319.4050109@jp.fujitsu.com \
--to=kato.takeharu@jp.fujitsu.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.