Hmm its not exactly clear what you are doing but I have a few points.

1. You can't use floating point operation inside the kernel unless you know EXACTLY 
what you are doing.

2. I don't know much about x86 but cli/sti must be some type of supervisor instruction 
so you can't use them from userspace.

3. If you are using fpu emulation the emulation is done in an exception handler thus 
you can't turn exceptions off(and in userspace it should not be possible even if you 
wanted).

4. you can't modify the time spent in the timer interrupt short of rewriting it.

5. I think you are trying to use floating point operations inside the kernel, you are 
using kernel emulation code, and you have turned off exceptions. The result is that 
the code is not doing anything
close to what you think its more like an empty loop. 

> Pawan Singh wrote:
> 
> Hi,
> 
> We are using RedHat 6.0 kernel as the embedded kernel. Only interrupt enabled is 
>"timer (1)" and "ethernet (14)". We are using AMD SC400 chip.
> 
> The following piece of code takes 4 seconds to execute with interrupts turned on:
> 
> for (i=1; i<10000; i++) {
>       double x = 3.4;
>       double y = 5.67
>       double z = x + y;
> }
> 
> If I surround this code with cli and sti (interrupts disabled) it takes 9000 
>microseconds.
> 
> When I do cat /proc/interrupts, I only see interrupts going up for "timer" (once 
>every millisecond) and ethernet once in a while.
> 
> Does linux kernel spend a lot of time processing timer interrupts? What is the 
>normal timer interrupt duration on a pentim based workstation? Where can I modify 
>this parameter in the kernel source
> code?
> 
> 
> Thanks
> Pawan
> [EMAIL PROTECTED]

--
To unsubscribe from this list, send a message to [EMAIL PROTECTED]
with the command "unsubscribe linux-embedded" in the message body.
For more information, see <http://waste.org/mail/linux-embedded>.

Reply via email to