Files
xen/docs/misc
Ross Lagerwall 70a6abd2cd x86: Always use eager-fpu
Lazy FPU avoids some work during a context switch but pushes more
expensive costs elsewhere:

* For a workload running some Windows VMs, I measured about 83% of
  context switches out had used the FPU so most of the time the FPU
  save/restore is not avoided, just delayed.
* A key difference between 32-bit and 64-bit OSes is that %xmm is in the
  base featureset for 64-bit and thus gets ubiquitous use in userspace.
  This is likely why we hit 83%.
* Setting/clearing the cr0.TS bit is serializing and reportedly slower
  than the processor optimized xsave/restore.
* Linux uses PKRU so a partial xsave/restore is performed on each
  context switch anyway, followed by a second xsave/restore at some
  point during execution. This interferes with the 'modified'
  optimisation that hardware uses to try and reduce the cost of the
  following XSAVE.

There is no measurable performance benefit for using lazy FPU and it
adds unwanted complexity so remove the option and always use eager-fpu.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2026-03-30 15:48:13 +01:00
..
2025-03-07 16:57:44 -08:00
2025-01-16 11:22:11 +00:00
2025-01-16 11:22:11 +00:00
2015-12-10 13:11:25 +01:00
2011-03-25 21:59:20 +00:00
2012-08-30 17:57:31 +01:00