Experimental threaded VM interrupt watchdog - #90
Conversation
|
Hmmm, compelling results! I think the bottom result may still be slightly faster than it should be with a properly-functioning scheduler, the watchdog thread currently spins in a loop with 50us granularity when it should probably just wait on a condition of either quanta reached or watchdog disarmed. That would also remove the problem of the kernel having to switch to the watchdog thread just for it to realize it has no work to do when scripts aren't even running. Merits some investigation, but for now, we'd probably just want to have the threaded watchdog flagged off except in dev. Need to do some research about how quickly we can expect the kernel to switch over to our watchdog thread, particularly under extreme contention. |
|
Funnily enough, ARM64's |
May not even go with this implementation, simply an experiment in deferring setting up an interrupt handler until we know the deadline has passed, in order to keep the
luau_executeloop hot. If it doesn't improve things, we'll ditch most of the work except for moving GC work out of the execution loop.NB: This is currently a rough PoC mostly written by Claude, so don't mind the noxious comment spam, the actual impl would be cleaned up.