Re: Low latency for recent kernels

Robert Love
2002-01-24T04:13:28Z

On Wed, 2002-01-23 at 22:48, Dan Maas wrote:

> Two situations where I would expect low-latency/preemption to have a
> positive effect on responsiveness are 1) when the system is under heavy CPU
> and disk load (e.g. kernel compile); due to the interactive tasks being able
> to run earlier/more often, and 2) when performing UI operations that depend
> on tight synchronization between X/the WM/the X client, particularly opaque
> window resizing. (my theory is that low-latency/preemption results in the
> CPU switching more rapidly or evenly among these processes, reducing the
> perceptible "lag" between the client window and its WM frame)

This is exactly the area preempt/low-latency helps and I think your
theory is pretty much dead on.

With preempt-kernel, ideally, an interactive task finds itself runnable
like this: user event causes interrupt, interrupt sets need_resched, on
return from interrupt we cause a preemption of current task (which can
happen whether task is in kernel or userland, now), and schedule the
interactive task onto the CPU.

This leads to better scheduling fairness and short scheduling latency.

If you or Havoc are interested in any tests or further work with the
preemptive kernel, I'd be more than willing. Hey, I use GNOME ;)

Robert Love