This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/18403] statically linked app uses FPU before main()
- From: "dave at sr71 dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 15 May 2015 14:51:42 +0000
- Subject: [Bug libc/18403] statically linked app uses FPU before main()
- Auto-submitted: auto-generated
- References: <bug-18403-131 at http dot sourceware dot org/bugzilla/>
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.