Re: RT patch acceptance

Ingo Molnar
2005-05-27T13:45:49Z

* Andi Kleen <ak@muc.de> wrote:

> > how would you do that, if even a first step (PREEMPT_VOLUNTARY) was
> > opposed by some as possibly hurting throughput? I'm really curious, what
> > would you do to improve PREEMPT_NONE's latencies?
>
> Mostly in the classical way. Add cond_resched where needed. Break up a
> few locks. Perhaps convert a few spinlocks that block preemption to
> long and which are not taken that often to a new kind of
> sleep/spinlock (TBD). Then add more reschedule point again.

been there, done that. A couple of years ago i started out with a
somewhat similar opinion to yours, which could be summed up as: "this
cannot be that hard, just break up the code, damnit". Wrote tools to see
where the latencies come from, and started sticking cond_resched()s in.
A few years down the road and after multiple restarts (lowlatency patch,
the first preempt prototype patch, -VP patchset, etc.) i ended up with
the -RT patch and with two new preemption models (PREEMPT_VOLUNTARY and
PREEMPT_RT) in addition to PREEMPT_NONE and PREEMPT. (With the extra
twist that when i started then the kernel was only 2 million lines big,
now it's 6+ million lines of code.)

Ingo