Guardian Digital Inc. > InfoCenter > Mailing List Archives > Linux Kernel

Linux Kernel Mailing List Archive

From: Esben Nielsen (simlo@phys.au.dk)
Date: Mon Dec 27 2004 - 11:23:11 EST

On Mon, 27 Dec 2004, Steven Rostedt wrote:

> On Mon, 2004-12-27 at 15:35 +0100, Esben Nielsen wrote:
> > I haven't seen much traffic on real-time preemption lately. Is it due
> > to Christmas or lost interest?
> >
> I think they are on vacation :-)
Oh, I thought I would have fun with some kernel programming in my
vacation! :-)
> > [...]
> Why just limit to the number of CPUs, but make a configurable limit. I
> would say the default may be 2*CPUs. Reason being is that once you
> limit the number of readers, you just bound the down_write. Even if
> number of readers allowed is 100, the down_write is now bound to
> O(ceil(n/#cpus)) as you said, but now n is known. Make a
> CONFIG_ALLOWED_READERS or something to that affect, and it would be easy
> to see what is a good optimal configuration (assuming you have the
> proper tests).
I agree with you that it ought to be configureable. But if you set it to
something like 100 it is _not_ deterministic in practise. I.e. during your
tests you have a really hard time making 100 readers at the critical
point. Most likely you only have a handfull. Then when you deploy the
system where you might have a webserver presenting data read under a
rw-lock is overloaded spawns 100 worker tasks. Bang! Your RT application
doesn't run!
It doesn't help you to have something bounded if the bound is insanely
high such you never reach it in tests. And if you try to calculate the
worst case scenarious for such a system you would find it doesn't
schedule. I.e. you have to buy a bigger CPU or do some other drastic

A limit like 1 reader per CPU on the other hand behaves like a
normal mutex priority inheritance wrt. determinism. And it scales like the
stock Linux rw-lock which in practise is also limited to 1 task per CPU as
preemption is switched off :-)

> [...]
> I have two SMP machines that I can test on, unfortunately, they both
> have NVIDIA cards, so I cant use them with X, unless I go back to the
> default driver. Which I would do, but I really like the 3d graphics ;-)

Well, these kind of things isn't something you want to combine with 3d
graphics right away anyway!
I have even had problems with crashing on 2.4.xx with a NVidia and
hyperthreading on a machine I helped install :-(
I am afraid NVidia cards and preempt realtime is far in the future :-(

> -- Steve


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

[ About Guardian Digital ] - [ Press Center ] - [ Contact Us ] - [ System Activation ] - [ Reseller Info ] - [ Online Store ] - [ Site Map ]
Copyright (c) 2000 - 2004 Guardian Digital, Inc. Linux Lockbox and EnGarde are Trademarks of Guardian Digital, Inc.