Context switch is a key part of multiprocessing. With more CPU features implemented, the switched states are growing. On x86 CPU, extended state (xstate) manages the state components which have been expanding from legacy floating points and SSE to AVX, AVX2, AVX512, MPX, and Intel PT registers. But the increasing xstates are putting pressure on mem/cache footprint for multi processes and speed of switching processes.
Fenghua Yu will overview existing context switch policy and its problems. He will discuss new technology to occupy less context mem and improve context switch performance. His optimization can reduce xstate mem space (2.5KB/process on the latest CPU) by 77% in the best case. New APIs to save/restore less context improve performance by limiting switched data to reduce time and cache footprint. The APIs are used in crypto, fast copy pages, etc.
The patches will be in 3.16.Survey this Session