Re: [rtl] Using floating point arithmetics with rtlinux 2.0
>From: "Michael Kabot" <[EMAIL PROTECTED]> >The runtime of the floating point section varies from less than 50 us > to 500 us in rare occasions. Its unbelievable but that's what I can see on my > scope. (And in the error detection of the software :-) If by "runtime," you mean the time actually to do the calculations as opposed to other delays such as interrupt latencies, and you are sure the calcs are not pre-empted by a handler and/or higher priority task, I would search elsewhere from a FPU switch. For example, we've found that numerical underflows were the cause for a sporadic increase in thread execution times. When an underflow occurs in x86 hardware, a process calls "denormalization" occurs that increases the bits assigned to the exponent. This is all handled by an exception, which eats up clock cycles. To avoid this, test the operands before the FP multiplication. Victor Iannello Synchrony Inc. -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] Using floating point arithmetics with rtlinux 2.0
Am Donnerstag, 21. Dezember 2000 09:04 schrieben Sie: Thanx for quick response. > It's possible that on rare occasions Linux will have run a task that used > the FPU so RTL must save FPU state when running your task. That's a very > expensive operation and may account for your occasional longer run-time. > May be. The runtime of the floating point section varies from less than 50 us to 500 us in rare occasions. Its unbelievable but that's what I can see on my scope. (And in the error detection of the software :-) > You can test this by dropping some conpr's in the FPU switch code when > Linux owns the fpu. Let me know what it tells you. Maybe I'll do this later. For now, I fixed my actual problem by moving the code into a non time critical section of my application and using integer arithmetics for that calculation instead of floats. By, Michael -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] Using floating point arithmetics with rtlinux 2.0
It's possible that on rare occasions Linux will have run a task that used the FPU so RTL must save FPU state when running your task. That's a very expensive operation and may account for your occasional longer run-time. You can test this by dropping some conpr's in the FPU switch code when Linux owns the fpu. Let me know what it tells you. -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
[rtl] Using floating point arithmetics with rtlinux 2.0
Hi all, I'm using rtlinux 2.0 in an industrial project since a long time, without any problems. ( See the rtlinux Homepage, Real world Applications, engraving machine ecograv :-) I have the following hardware equipement: AMD 586 DX 133 MHz 32 MB RAM Realtek PCI Ethernet on board ELAN SBC-411/E board No Graphics And the following problem: I extended my programm with some floating point arithmetics. Really very simple things, just four multiplications. Most the time it works fine. The runtime of my task is about 300 us. Sometimes, the runtime increases to more than 500 us and that is too much for my application because I must satisfy some timing conditions. I did some debugging with an Oszilloscope connected to a port pin of the printer port and I can see, that my floating point calculation takes sometimes a longer time. But the executed code is the same. This problem occurs one or two times an hour or less :-( 1) Is it possible, that I can' t get access to the FPU unit from rt_process ? I do a lot of floating point arithmetic in Linuxland. 2) Is it possible, that a PCI Network card can cause problems like this ? I have a lot of traffic on the Network in Linuxland. Thanx in advance, Michael Kabot -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/