Like other types of allocation, fpu_kern_ctx are frequently allocated per-cpu.
Provide the API and sketch some example consumers.
(Long term, maybe it makes more sense to just shove one of these in the DPCPU
area?)
Differential D22053
Add domainset policy allocation for fpu_kern_ctx cem on Oct 16 2019, 3:44 AM. Authored by Tags None Referenced Files
Subscribers
Details
Like other types of allocation, fpu_kern_ctx are frequently allocated per-cpu. (Long term, maybe it makes more sense to just shove one of these in the DPCPU
Diff Detail
Event TimelineComment Actions DPCPU allocations might work - it looks like we only ever allocate one array per driver, so the allocation size is known at compile time. DPCPU has another advantage: ctx_fpu[] itself has to be accessed in the current scheme, and that may be a remote access. Comment Actions It's mostly that we only ever want one of these per CPU (per driver), and by and large these drivers don't need to be preempted or stacked. So a single kernel context per CPU provided by the base system, for any accelerated driver to use, would remove some of the boilerplate of using SSE/AVX code on the correct memory domain.
Sure, that's true too.
|