After scouring the XNU kernel source code, I came across restartable ranges [1].
They seem to be a task-level version of the the part of Linux's restartable sequences [2] for user requested synchronization [3] (akin to MEMBARRIER_CMD_RSEQ).
Because of their differences, I would like to know more about how they work and what they are used for.
From what I have gathered [4], they seem to be closer to RCU [5] that waits for eviction (as opposed to completion). But the fact that they are barely mentioned anywhere (see [4]) in the XNU source code
I'd be really happy if you can point me to more information about them and how they compare to rseq (or rcu).
What are the XNU devs planning on doing with them?
[1] osfmk/kern/restartable.c: https://github.com/apple-oss-distributions/xnu/blob/f6217f8/osfmk/kern/restartable.c
[2] https://criu.org/Restartable_Sequences
[3] as opposed to (what I think is what makes rseq really cool) automatic eviction on preemption/CPU migration
[4] there seems to be very little information online (including this forum) and the only places inside the XNU kernel source trees that aren't tests are in osfmk/kern/{thread,thread,sched_prim}.{c,h}, which doesn't really give much more information.
[5] Read-Copy-Update: https://www.kernel.org/doc/html/latest/RCU/whatisRCU.html
3
0
473