4 ms·
> It would be nice if there was a way to use Intel's debug registers to write a value to some address, which would then interrupt some kernel task What you hav
by nrds 1y ago
> It would be nice if there was a way to use Intel's debug registers to write a value to some address, which would then interrupt some kernel task
What you have described is literally the syscall mechanism. That's what it is. You perform some register write (via a specific instruction) and an interrupt is taken to the kernel.
Maybe you believe that an asynchronous interrupt would cost less than a synchronous interrupt for this particular objective but I'm not sure there's evidence for that claim.
- gpderetta 1y agoAn asynchronous interrupt would be more expensive, but if you can send it to another core, you do not need to pay the cost on this core, in particular you do not need to enter the kernel. This is particularly useful for remote wakeups when you want to schedule a thread on an another core. As I mentioned elsewhere, intel was planning to add user-mode interrupts specifically for this sort of scenarios.
- geertj 1y ago> in particular you do not need to enter the kernel Yup, that's exactly what I was looking for. I'll look async and user-mode interrupts, thanks for the search terms!