2 ms·
Fun fact: about ten years ago I was working on a research project that involved implementing a high-precision timer mechanism in the Linux kernel. Timer latenc
by elihu 12y ago
Fun fact: about ten years ago I was working on a research project that involved implementing a high-precision timer mechanism in the Linux kernel. Timer latency is caused mostly by either a) the long 10ms delay between timer interrupts and b) non-preemptible code paths in the linux kernel (having user-space code preempt the kernel was a new thing then).
When we fixed the timer latency problem, it made the non-preemptible code paths more obvious. A lot of those were well-known and there was work at the time to fix them, but one that I stumbled across by accident that I thought was pretty interesting is that when you hit the caps lock key on a PS2 keyboard, the kernel would lock up for seven milliseconds as it negotiated with the keyboard to turn the caps lock light on. (You could also trigger this path without touching the caps lock key by using the "setleds" command.)
- lbotos 12y agoI don't know if it's the same thing, but a Hardware teacher in HS used to tell us that was the best way to diagnose a hung windows machine. If capslock didn't light up, then it needed to be rebooted.
- cmdrfred 12y agoThis is my test to see if the monitor has malfunctioned or if the machine refuses to wake up from sleep.