Closed MBkkt closed 1 year ago
Thanks for your question. FYI, we're in the process of porting information from our internal wikis to an externalizable set of design docs.
Yes, it's definitely preemptive. We use the retired-branch-conditional perf counter (RCBs) in order to preempt syscall-free regions of the guest execution. This facility is built in at the Reverie layer as the set_timer_precise
function, which arranges for a callback to trigger exactly N RCB events after that call. There's a whole bunch of logic for setting what these time slices should be: either a large slice of time only as a backstop for breaking busy-waits, or a smaller random slice of time under --chaos
, in order to explore thread interleavings.
Of course, syscalls, cpuid, rdtsc, and signals are all intercepted events that switch control to the scheduler as well.
Understood, thanks!
But in that case, can I specify some calls to not included to this?
Try to explain why do I want it:
What if I run something in CI, it failed, I have seed, but if I run it with log debug, or something like this. it will be other path in "execution graph".
Is it possible to disable perf counter and some syscalls from going to scheduler?
If yes how it works? Maybe you can share some open design docs/notes/comments?
If no, have you plan to change it?