Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

His loop needs to deal with an encoder that generates 1-4K ticks per rotation, hooked to a spindle running, IIRC, 2K RPM. I think his concern was that was 8M events per second, all while also generating stepper outputs.

He mentioned not only microsecond but nanosecond.

It reminds me of Linux routers. They worked great until the PPS rate suddenly got high, like in a network loop or DDoS situation. The kernel would dynamically switch between interrupts and interrupt mitigation/polling, I couldn't find any way to force it to always poll.

If the system was in interrupt mode, and the PPS rate suddenly went way up, the system was so busy handling the interrupts that it couldn't find the time to switch to interrupt mitigation and would livelock.

The solution was fairly easy: Just have more CPU cores than physical network interfaces. Disclaimer: This was ~10 years ago.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: