From: Manish Lachwani <mlachwani@mvista.com>
To: Jun Sun <jsun@junsun.net>
Cc: Pavel Kiryukhin <vksavl@cityline.ru>, linux-mips@linux-mips.org
Subject: Re: Preemption in do_cpu (Re: [PATCH]Preemption patch for 2.6)
Date: Mon, 18 Apr 2005 14:35:16 -0700 [thread overview]
Message-ID: <42642814.8040701@mvista.com> (raw)
In-Reply-To: <20050418212021.GA12996@gw.junsun.net>
Jun Sun wrote:
>On Mon, Apr 18, 2005 at 01:32:46PM +0400, Pavel Kiryukhin wrote:
>
>
>>Hi,
>>the preempt_disable/preempt_enable sequence in do_cpu() [traps.c]
>>exists quite long (patch submitted in Oct. 2004), so it should be nothing
>>wrong there.
>>
>>Can somebody please comment why use of preempt_disable/enable in do_cpu
>>will not result in "scheduling while atomic" for fpu-less cpu (with enabled
>>preemption).
>>
>>The sequence looks like
>>
>>do_cpu()
>>| preempt_disable()
>>| fpu_emulator_cop1Handler()
>>| | cond_reshed()
>>| | | schedule() <------ scheduling while atomic
>>
>>
>>The proposed patch was tested for Sibyte, but it has fpu (AFAIK) and has no
>>fpu_emulator_cop1Handler called.
>>
>>
>>
>
>fpu_emulator maintains global variables and in general is dangerous
>to be preempted in the middle of processing.
>
>The quick fix for this problem is probably to move preemption disabling/
>enabling inside fpu_emulator_cop1Handler().
>
>Better fix is probably to modify fpu emulator so that it is preemption
>safe overall.
>
>Jun
>
>
Missed this one ! I had a patch that enables preemption before the
cond_resched and disables right after it. I forgot to send it to
linux-mips though. But, I needed it to work on fpu-less CPU. My bad.
Thanks
Manish Lachwani
next prev parent reply other threads:[~2005-04-18 21:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-22 18:06 [PATCH]Preemption patch for 2.6 Manish Lachwani
2004-10-24 15:28 ` Atsushi Nemoto
2004-10-24 15:41 ` Ralf Baechle
2005-04-18 9:32 ` Preemption in do_cpu (Re: [PATCH]Preemption patch for 2.6) Pavel Kiryukhin
2005-04-18 21:20 ` Jun Sun
2005-04-18 21:35 ` Manish Lachwani [this message]
2005-04-19 1:24 ` Preemption in do_cpu Atsushi Nemoto
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=42642814.8040701@mvista.com \
--to=mlachwani@mvista.com \
--cc=jsun@junsun.net \
--cc=linux-mips@linux-mips.org \
--cc=vksavl@cityline.ru \
/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