[PATCH v1 1/2] x86: Implement sched_yield syscall for x86 only.
Zack Weinberg
zack@owlfolio.org
Thu Jun 8 18:26:55 GMT 2023
On Thu, Jun 8, 2023, at 10:39 AM, Noah Goldstein via Libc-alpha wrote:
> I don't think we need/want this for every syscall. Only the syscalls
> where there is a high probability of a proper ctx switch and the calling
> process going back to the schedule loop.
Yeah, but that includes every syscall that performs I/O, which is most of them. Isn't it?
If these registers are all call-clobbered then maybe it makes sense to do this unconditionally in the syscall entry path, kernel side. That way only context switches triggered by actual preemption would have to pay the extra register save costs.
zw
More information about the Libc-alpha
mailing list