Hacker News new | past | comments | ask | show | jobs | submit login
User-Space Interrupts (2021) (lwn.net)
38 points by hyperbrainer 5 months ago | hide | past | favorite | 7 comments



Keep in mind it doesn't magically wake up descheduled tasks. So it's necessary to go through the kernel if the destination task is not currently running on a CPU. The latency in that case will be similar to what we have today.

And in cases where you can guarantee that the destination task is running you can already uses shared memory for low-latency communication today (polling or mwait).

I'm not saying userspace interrupts are useless but they are not as convincing as it seems at first glance. I think more proof of concepts (enabling real applications) and benchmarking are needed to demonstrate the advantages.


AFAICT Intel has given up on supporting this in the kernel.

They've been silent about the patch since at least January 2023[0], and archived the repo for their kernel fork[1] in April.

It's a real shame because this kind of innovation seems valuable.

[0]: https://www.phoronix.com/news/Linux-SPR-Intel-User-Interrupt...

[1]: https://github.com/intel/uintr-linux-kernel


But is it another thing like AVX-512 which won't see use outside of a few hyperscalers because Intel will be slow to roll it out?


This is a fair point, but dropping the kernel patch guarantees that essentially nobody will use this.

Given part of the patch was software emulation for unsupported CPUs, it's possible that people would've implemented support for it anyway, incentivising Intel to push it more broadly.


AVX-512 is on Zen5. Ultra-popular libraries like simdjson can use it. https://github.com/simdjson/simdjson/issues/10

In general my hope is that runtimes pick up the good stuff & roll with it. Io_uring hasn't exactly been a stunning success on nidejs/libuv but the promise is so real that runtimes can take sweet io capabilities like io_uring or usersoace interrupts & boom, now everyone's ok is faster.


About the SENDUIPI instruction: https://www.felixcloutier.com/x86/senduipi

It seems to require the kernel to set the IA32_UINTR_TT MSR before it does anything, so at least you can't send random IPIs to other processes from userspace.

I wonder about the cost of supporting these unused features in Intel chips. Will Intel keep including it forever even if no one adopts it? Drop it? (It is controlled by a CPUID feature flag so that is possible.)


Why so you think no one uses it? Probably someone asked for this.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: