[PATCH v1 1/2] x86: Implement sched_yield syscall for x86 only.
Florian Weimer
fw@deneb.enyo.de
Thu Jun 8 11:43:16 GMT 2023
* Noah Goldstein via Libc-alpha:
> We slightly optimize it by using `vzeroall` before the actual syscall.
> This returns the SSE, AVX, and ZMM_HI256 xsave/xrstor states to the
> init-state which allows the imminent context switch to skip
> saving/restoring those states.
Surely there is a better way to implement this, enabling something
similar for all system calls issued by libc on the kernel side? It
changes userspace ABI, so it has to be opt-in. Maybe it could be an
additional flag in the system call number, indicating that it is safe
to zap the vector state if it is beneficial.
More information about the Libc-alpha
mailing list