Re: why Does Kernel Module should not do Floating Point operation?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



AFAIK the kernel doesn't save the FPU registers. The SAVE_ALL macro that stores and saves the cpu registers doesn't work with FPU registers.

On 6/27/06, Manjunath_Naik <Manjunath_Naik@xxxxxxxxxx> wrote:

Hi Jinesh

Thanks for your response.

Does this mean that when context switch occurs, the kernel always stores
the FPU registers and status even though the particular process does not
do any floating point operation?

But how does it relate to the "We should not use Floating -point
operation in Kernel? Is it is simply a design issue to have much
performance or we cannot do at all floating point operation in kernel
itself?

Thanks
Manjunath Naik


-----Original Message-----
From: Jinesh K J [mailto:jineshkj.newsletters@xxxxxxxxx]
Sent: Tuesday, June 27, 2006 4:28 PM
To: Manjunath_Naik
Cc: kernelnewbies
Subject: Re: why Does Kernel Module should not do Floating Point
operation?

> What is meant by FPU? How does it relates to kernel?
>
FPU (Floating Point Unit) is a special hardware accompanied with your
processor (usually within) for doing floating-point arithmetic. Its
infact a separate processing core with its own set of registers for
doing the work. As with any other resource, concurrent access and race
conditions are possible in this one also, which requires us to save
the FPU state(registers) in case of any context switch. The kernel
doesn't wanna have this overhead when it can mostly do without it.

I hope you have got your answer.

jinesh.



DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux