Skip to contentSkip to conversation

i386: inline restore_fpu

PATCH Andi Kleen 1 participant 1 message Jul 23, 2005 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 200507212309_MC3-1-A534-95EF@compuserve.com.suse.lists.linux.kernel

A message that is not in the archive (sent off-list or not yet received): [email protected]

Andi Kleen

author
#2 lore raw
Quoted 8 lines · Andrew Morton

We do have the `used_math' optimisation in there which attempts to avoid doing the FP save/restore if the app isn't actually using math. But <ancient recollections> there's code in glibc startup which always does a bit of float, so that optimisation is always defeated. There was some discussion about periodically setting tasks back into !used_math state to try to restore the optimisation for tasks which only do a little bit of FP, but nothing actually got done.

Actually we reset the flag on every context switch, so that works just fine.

But I was considering to do it less often so that we switch the FP state non lazily for FP intensive processes and avoid the overhead of all these exceptions.

-Andi

P.S.: Original profile data looks a bit fishy. Normally avoiding a single function call should not make tht much difference unless you call it in a inner loop, but that is not the case here.