Re: How how latent should non-preemptive scheduling be?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Peter Zijlstra
Date: Wednesday, September 17, 2008 - 7:42 pm

On Wed, 2008-09-17 at 14:54 -0700, Arjan van de Ven wrote:

Really hard subject. Perfect fairness requires 0 latency - which with a
CPU only being able to run one thing at a time is impossible. So what
latency ends up being is a measure for the convergence towards fairness.

Anyway - 200ms isn't too weird depending on the circumstances. We start
out with a 20ms latency for UP, we then multiply with 1+log2(nr_cpus)
which in say a quad core machine ends up with 60ms. That ought to mean
that under light load the max latency should not exceed twice that
(basically a consequence of the Nyquist-Shannon sampling theorem IIRC).

Now, if you get get under some load (by default: nr_running > 5) the
expected latency starts to linearly grow with nr_running.

doing much (and after having looked up the original email I see its a
eeeeeeeee atom - which is dual cpu iirc, so that yields 40ms default) -
so 200 is definately on the high side.

What you can do to investigate this, is use the sched_wakeup tracer from
ftrace, that should give a function trace of the highest wakeup latency
showing what the kernel is doing.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: How how latent should non-preemptive scheduling be?, Sitsofe Wheeler, (Wed Sep 17, 2:48 pm)
Re: How how latent should non-preemptive scheduling be?, Arjan van de Ven, (Wed Sep 17, 2:54 pm)
Re: How how latent should non-preemptive scheduling be?, Sitsofe Wheeler, (Wed Sep 17, 3:29 pm)
Re: How how latent should non-preemptive scheduling be?, Peter Zijlstra, (Wed Sep 17, 7:42 pm)
Re: How how latent should non-preemptive scheduling be?, Sitsofe Wheeler, (Thu Sep 18, 11:25 am)