This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/18403] statically linked app uses FPU before main()


https://sourceware.org/bugzilla/show_bug.cgi?id=18403

Dave Hansen <dave at sr71 dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl.tools at gmail dot com

--- Comment #3 from Dave Hansen <dave at sr71 dot net> ---
Using the FPU forever costs a process memory (for kernel FPU state), power (to
keep that part of the CPU powered on), and CPU cycles (to save/restore the
state).  The first 5 uses (which occur after a context switch) are also
guaranteed to cause a device-not-available/#ND exception if the kernel is in
its lazy FPU mode.

The kernel tries to be lazy about allocating and saving/restoring FPU state. 
If the task is virtually guaranteed to have FPU state, then we should
reconsider the lazy mode being the default.  This lazy mode is utterly useless
and counterproductive if userspace is guaranteed to use the FPU in every task.

It would be nice if an application had the choice to use the FPU or not.  This
issue was touched on in bug#18402 and H.J. Lu suggested discussing it in
another issue.

Feel free to close this if it is not something you consider a bug.  I just
wanted to bring it to your attention.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]