Page MenuHomeFreeBSD

Deprecate fpu_kern_thread()
Needs ReviewPublic

Authored by jtl on Sep 15 2023, 9:51 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 9, 8:22 AM
Unknown Object (File)
Thu, May 9, 6:29 AM
Unknown Object (File)
Mar 18 2024, 4:41 PM
Unknown Object (File)
Dec 22 2023, 8:45 AM
Unknown Object (File)
Oct 30 2023, 11:40 PM
Unknown Object (File)
Oct 24 2023, 9:41 AM
Unknown Object (File)
Oct 12 2023, 7:55 AM
Unknown Object (File)
Oct 11 2023, 12:08 PM

Details

Summary

We believe all of the in-tree uses of kernel FPU now support using FPU_KERN_NOCTX or allocated contexts.

In cases where FPU support is used multiple times across discrete function calls (none of which rely on the FPU state from the previous one), it seems wasteful to potentially save/restore that state across these calls when there are context switches. Instead, for cases like these with short enough run times, we can rely on FPU_KERN_NOCTX. If the context must be carried across multiple calls or the run time is too long for a critical section, we can use an allocated context.

Test Plan

In a short test on amd64 with one particular workload, this seems to produce no obvious regression. We are going to run a more detailed analysis over the weekend with that same workload.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

jtl requested review of this revision.Sep 15 2023, 9:51 AM
share/man/man9/fpu_kern.9
163–164

I wonder if we should provide a reference to removed interfaces, for someone who comes across older examples or code? Might not be an issue as we may expect them to easily find (via search engine) this review or the associated commit.