assembly - using x86_64 FPU with out checking for irq_fpu_usable, if xsaveopts instructions is supported by processor -


itemprop = "text">

The X86 (_64) saving of the FPU reference in IRQ references (both soft and hard IRQs) is costly activity. So before using the FPU, irq_fpu_usable is checked.

My questions below are:

  1. If the processor supports the xsaveopts instructions, then is it still saving FPU is an expensive activity ?

  2. What can we do if we save the FPU reference in the IRQ context?

XSAVEOPTS (X87, XMM, YMM), and it is very likely that x87 and XMM registers will need to be saved. So it is still going to be an expensive operation.

Note that the purpose of the Linux kernel function irq_fpu_usable is to decide if it is allowed to use the FTP, it does not check that using your FTP This will mean the costly activity of saving the FPU reference.

If the irq_fpu_usable is true and you use the FPU in the kernel_fpu_begin and kernel_fpu_end then the safe use of the FPU in the IRQ context needed. Although it may be slower than the alternative code, which does not use the FPU at all.

You should not try to save your own FPU context, if this means your second question.


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -