RFC x86,fpu: make FPU context switching much lazier
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest5 patches 21 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | x86,fpu: split prev/next task fpu state handlingarch/ arch/ arch/ +1 more | +39 | 2 replies | |
| 2/5 | x86,fpu: delay FPU register loading until switch to userspacearch/ arch/ arch/ +5 more | +71 | 15 replies | |
| 3/5 | x86,fpu: add kernel fpu argument to __kernel_fpu_beginarch/ arch/ arch/ +1 more | +11 | 0 replies | |
| 4/5 | x86,fpu: lazily skip FPU restore when still loadedarch/ arch/ arch/ | +23 | 4 replies | |
| 5/5 | x86,fpu: kinda sorta fix up signal patharch/ arch/ | +5 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH RFC 0/5] x86,fpu: make FPU context switching much lazier
This series is an attempt at making the x86 FPU context switching code much lazier. By only reloading the FPU context when a task switches to user mode, we can avoid switching FPU context for tasks that spin in kernel mode, and avoid reloading the FPU context for tasks that get interrupted by a kernel thread or briefly go idle.
It also allows us to skip restoring the userspace FPU context when exiting a KVM guest.
This series is still BROKEN. The first 3 patches seem to work fine in my tests (but should not, due to missing signal path code), while the 4th test makes it easier to trigger bugs.
I am posting this to ask about obvious issues people may see, ideas on what direction I should take this series in, and to avoid code conflicts with Andy's plans wrt. lazy fpu mode.