We often come across the term latency; what exactly does it mean in the context of the kernel? A synonym for latency is delay and that's a good hint. The latency (or delay) is the time taken to react – in our context here, the time between the kernel scheduler waking up a user space thread (or process), thus making it runnable, and the time when it does actually run on the processor is the scheduling latency. (Do be aware, though, the term scheduling latency is also used in another context, to mean the time interval within which every runnable task is guaranteed to run at least once; the tunable is here: /proc/sys/kernel/sched_latency_ns, and, at least on recent x86_64 Linux, defaults to 24 ms). Similarly, the time elapsed from when a hardware interrupt occurs (say a network interrupt) to when it's actually serviced by it's handler routine, is the interrupt latency.
The cyclictest user space program was written...